Re: [jgrapht-users] Edge label questions
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2010-02-24 19:20:50
|
It looks like you adapted the code from here: http://pub.eigenbase.org/wiki/JGraphT:LabeledEdges But I don't think you adapted it correctly. Vanessa Ruiz wrote: > private static class ListenableDirectedMultigraph<V, MyEdge> > extends DefaultListenableGraph<V, MyEdge> > implements DirectedGraph<V, MyEdge> > { > private static final long serialVersionUID = 1L; > listenableDirectedMultigraph(class <MyEdge>(edgeClass)) > { > super (new DirectedMultigraph<V, MyEdge>(new > ClassBasedEdgeFactory<V, RelationshipEdge>(RelationshipEdge.class)); > } > } Here you are still referring to RelationshipEdge instead of MyEdge. Also, your constructor starts with a lowercase l where it should be L to match the class name. And I don't know what "class <MyEdge>" means. Finally, it's not actually necessary to have the v1/v2 data members (in fact that duplicates storage from the DefaultEdge base class); that example wiki page needs to be updated. JVS |