the best data structure

This is a discussion on the best data structure within the Programming Languages forums in category; Suppose you have a lot of different networks of cities where the same city can be a member of more than one network. What would be a superior data storage structure then a : typedef map<const city*, int > _Distance; typedef map<const city*, _Distance> Graph_t where city is data structure representing a city ?...

Go Back   Application Development Forum > Programming Languages

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2008, 09:50 AM
danijel.mandich@gmail.com
Guest
 
Default the best data structure

Suppose you have a lot of different networks of cities where the same
city can be a member of more than one network. What would be a
superior data storage structure then
a :

typedef map<const city*, int > _Distance;
typedef map<const city*, _Distance> Graph_t

where city is data structure representing a city ?

Reply With Quote
  #2  
Old 08-27-2008, 07:30 PM
Gene
Guest
 
Default Re: the best data structure

On Aug 27, 9:50*am, danijel.mand...@gmail.com wrote:
> Suppose you have a lot of different networks of cities where the same
> city can be a member of more than one network. What would be a
> superior data storage structure then
> a :
>
> typedef map<const city*, int > _Distance;
> typedef map<const city*, _Distance> Graph_t
>
> where city is data structure representing a city ?


You haven't provided enough information to answer the question. Data
structures only have relative values in the context of the operations
to be performed on them. Any data structures textbook will give you
lots of insight on different graph representations, each of which
makes most sense in a different context.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:38 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.