[jgrapht-users] Weighted graphs
Brought to you by:
barak_naveh,
perfecthash
From: Maarten T. M. <maa...@st...> - 2008-01-21 15:58:29
|
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. |