Re: [jgrapht-users] Weighted graphs
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2008-01-21 18:09:01
|
Yes, either your edge class needs to extend DefaultWeightedEdge, or your graph implementation needs to override setEdgeWeight. JVS Maarten Th. Mulders wrote: > Hi all, > > As I am trying to work with weighted graphs, I've come across a problem I > don't understand. > My weighted graph contains vertices of type ISynsetID and edges of > IPointer. The former gives no problems, but when I try to set the weight > of an edge using the graph's setEdgeWeight method, I get an > ClassCastException: edu.mit.jwi.item.Pointer (that is the class that > implements the IPointer interface). > Looking through the source code, I found that it tries to cast my edge to > a DefaultWeigtedEdge. I don't see the reason for that. Should my edge > class extend DefaultWeightedEdge? I can't find that in the (java)docs, nor > on the wiki. > > Thanks in advance, > > Maarten Th. Mulders > > PS. Please excuse my last email, it was send accidentally send without > contents. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |