Re: [jgrapht-users] Maps as graphs
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2007-01-23 20:38:21
|
Trevor Harmon wrote: > On Jan 23, 2007, at 12:28 PM, Richard Moore wrote: > >> I'm interested in modelling a map of a city as a JGraphT graph. >> I've had >> reasonable success so far, using custom objects at nodes to represent >> junctions, etc. I'd like to be able to associate names with edges, >> in order >> to implement street names. I've tried extending >> DefaultWeightedEdge, with a >> new object, but this doesn't seem to work. Has anyone got any >> experience >> with this, or suggestions how this may be done, without recourse to a >> secondary data structure to lookup edge names? > > Couldn't you just add a "name" field to whatever class you're using > for edges? Richard, this discussion on the wiki may be relevant: http://jgrapht.wikispaces.com/message/view/home/88807 JVS |