Re: [jgrapht-users] Finding existing vertices in JGraphT
Brought to you by:
barak_naveh,
perfecthash
From: John S. <js...@gm...> - 2010-03-01 02:04:55
|
It might be possible to genericize this by creating a class KeyedGraph which takes another graph type as a generics parameter and extends that. Then it could either use a listener or method overrides to maintain the map automatically. I haven't played around with that, but if someone gets it working and wants to contribute it, that would be great; I have come across similar use cases in the past myself but always kept the map outside in some other builder class. JVS On Feb 28, 2010, at 2:41 AM, "Andrew Doble" <ad...@gm...> wrote: > Hallo, > > I’m trying to read in a set of publically available data files that > contain data about the human immune system and load them into a mult > igraph structure. Each vertex and each edge need to have a number of > attributes and I have represented them with a class specific to the > problem at hand. However, the order of the data in the files is not > under my control. I therefore need to be able to find previously cr > eated vertex objects that have been added to the multigraph so that > I can add new edges and vertices to them as I encounter them in the > data file. > > I could create a “shadow” Map that contains the vertices already > added to the multigraph and use this to find what has previously bee > n added. However, this strikes me as such a common scenario that I f > eel there should be something (that I’ve missed) in the JGpaphT pack > age that allows me to do this without setting up another data struct > ure. > > Can anybody help me further? > > Many Thanks > > Andrew > > -- > GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.! > http://portal.gmx.net/de/go/dsl02 > > --- > --- > --- > --------------------------------------------------------------------- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users |