Re: [jgrapht-developers] interface breaking changes
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2006-05-30 05:35:47
|
OK, the bomb has dropped, the dust has settled, and there's no looking back. I have committed a massive change to Subversion, getting rid of the Edge package entirely and moving all of the connectivity/weight info to the Graph interface. It should now be possible to create views such as edge-reversals and different weightings on the same underlying graph. Details are at a new wiki I just created (free ad-supported hosting from wikispaces.com) for JGraphT: http://jgrapht.wikispaces.com/MigrationTo0.7 I'm sure there's lots of cleanup needed (e.g. generating various serialVersionUUID's), and now we should be able to get rid of a lot more of the lint warnings. Try it out and send me suggestions if you see something that doesn't look right. The experimental package build is temporarily broken as a result of my changes, because I didn't fix all of the dependencies in there. Notes: - Edges which inherit from the new DefaultEdge use an "IntrusiveEdge" mechanism so that the connectivity info is really still inside of the edge, but hidden away. For other edge types, a HashMap is used to go from edge object to connectivity info. - Edge factories are still there, but now there's a way to get one based on YourEdge.class. For type-safety, you now have to supply an edge factory in all cases; with generics, there's no way to make edge construction happen automatically, and I didn't want to get rid of the addEdge(V,V) method, because it's very convenient when you aren't using a custom edge class. This is a minor annoyance at the time of graph instantiation. I considered introducing another level of classes to provide correct defaults for this case, but this would have required a companion class for every single one of the "gallery" classes in org.jgrapht.graph, and there are so many of those already! JVS |