Re: [jgrapht-users] info on cloning undirected graph
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2010-02-02 17:02:20
|
There is a clone() on AbstractBaseGraph (see testsrc/org/jgrapht/graph/CloneTest.java), and also a utility method org.jgrapht.Graphs.addGraph which can be used to copy the contents of one graph into a new empty graph. JVS andrea pagani wrote: > Hi everybody, > > It's me again, well I need to have a copy of my graph to work on without > reflecting the changing on the original one. > I saw that UndirectedGraph class has no implementation of clone() > method. My idea is the to extract the edgeFactory from the original one > and build a SimpleGraph from that edgeFactory. > Do you think it's correct? > My issue is the edgeFactory I get from the original graph is empty...and > so the simpleGraph I then create is empty as well... > > > Any suggestion is more than welcome. > > > Thank you in advance. > > > Best Regards, > > Andrea > > > > PS: as you might see I'm not an experienced java programmer! > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > > > ------------------------------------------------------------------------ > > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users |