[jgrapht-users] Finding existing vertices in JGraphT
Brought to you by:
barak_naveh,
perfecthash
From: Andrew D. <ad...@gm...> - 2010-02-28 10:41:20
|
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 multigraph 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 created 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 been added. However, this strikes me as such a common scenario that I feel there should be something (that I’ve missed) in the JGpaphT package that allows me to do this without setting up another data structure. 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 |