Re: [jgrapht-users] Maps as graphs
Brought to you by:
barak_naveh,
perfecthash
From: Trevor H. <tr...@vo...> - 2007-01-23 20:34:26
|
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? Trevor |