[Jaslibrary-support] jas.graph.statistics
Brought to you by:
sonnessa
|
From: Julien T. de B. <jul...@ep...> - 2005-05-04 14:42:32
|
Hello,
I ve got a problem with the function NetworkStatComputer.getDoubleValue.
For some value_id, the error "java.lang.ClassCastException:
java.lang.String" is returned. Actually, except for 1,14,16,18,19, i ve
got this problem. Here is the code i typed ( i tested with some other
graphs and i had still the same error) :
public class test_connectivity {
public static void main(String[] arguments) {
ListenableDirectedGraph g = new ListenableDirectedGraph();
g.addVertex("A");
g.addVertex("B");
g.addVertex("C");
g.addVertex("D");
g.addVertex("E");
g.addVertex("F");
g.addVertex("G");
g.addEdge("A", "B");
g.addEdge("A", "C");
g.addEdge("D", "E");
g.addEdge("B", "F");
g.addEdge("F", "G");
NetworkStatComputer stat = new NetworkStatComputer(g);
for(int i=1;i<25;i++){
try{
System.out.println(i+":"+stat.getDoubleValue(i));
}
catch(Exception e) { System.out.println("Erreur pour"+i+" "+e);}
}
}
}
Thanks for your help.
|