val smallSimGraph: Graph[Int, WUnDiEdge] = Graph(
WUnDiEdge(1,2)(0.9), WUnDiEdge(1,3)(0.7), WUnDiEdge(1,4)(0.2), WUnDiEdge(1,5)(0.05),
WUnDiEdge(2,3)(0.85), WUnDiEdge(2,4)(0.05), WUnDiEdge(2,5)(0.2),
WUnDiEdge(3,4)(0.05), WUnDiEdge(3,5)(0.15),
WUnDiEdge(4,5)(0.9)
)
val channelDescriptor = new NodeDescriptor(typeId = "Channels") {However, once I try to format the graph via this descriptor I get the error displayed below. I find myself a bit lost here (not too surprising since I started using this library about two days ago), shouldn't the WEdgeSerializer be sufficient for this use case?
def id(node: Any) = node.toString
}
val quickJson = new Descriptor[Int] (
channelDescriptor,
WUnDi.descriptor[Int](Some(new WEdgeSerializer))
)
java.lang.NoSuchMethodError: scalax.collection.GraphEdge$UnDiEdge.weight()J
at scalax.collection.io.json.descriptor.WEdgeDescriptor.toParameters(EdgeDescriptor.scala:126)
...
I getprintln(smallSimGraph.toJson(quickJson)){"nodes":[4,1,3,5,2],"edges":[["3","5",0.15],["1","2",0.9],["4","5",0.9],["1","4",0.2],["1","5",0.05],["3","4",0.05],["1","3",0.7],["2","4",0.05],["2","5",0.2],["2","3",0.85]]}
Please check your library dependencies.