From: SourceForge.net <no...@so...> - 2006-10-29 16:20:07
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3986014 By: nobody Hello, May be this is a stupid question...but I don't unterstand your example of the clusterting Coefficient: Here is the implementation of the network: StringBuffer buffer= new StringBuffer(); buffer.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n"); buffer.append("<graph edgedefault=\"undirected\">\n"); buffer.append("<node id=\"1\"/>\n"); buffer.append("<node id=\"2\"/>\n"); buffer.append("<node id=\"3\"/>\n"); buffer.append("<node id=\"4\"/>\n"); buffer.append("<node id=\"5\"/>\n"); buffer.append("<node id=\"6\"/>\n"); buffer.append("<edge source=\"1\" target=\"2\"/>\n"); buffer.append("<edge source=\"1\" target=\"6\"/>\n"); buffer.append("<edge source=\"1\" target=\"4\"/>\n"); buffer.append("<edge source=\"1\" target=\"5\"/>\n"); buffer.append("<edge source=\"2\" target=\"6\"/>\n"); buffer.append("<edge source=\"4\" target=\"5\"/>\n"); buffer.append("<edge source=\"4\" target=\"3\"/>\n"); buffer.append("<edge source=\"6\" target=\"3\"/>\n"); buffer.append("</graph>\n"); And here is my implementation: Map map = GraphStatistics.clusteringCoefficients((Graph)graph); if((map == null)||map.size() == 0) return -1; Iterator keySet = map.keySet().iterator(); while ( keySet.hasNext() ) { System.out.println(keySet.next().getClass()); Vertex v = (Vertex) keySet.next(); System.out.println(v.toString()); The resut of this output looks like this... class edu.uci.ics.jung.graph.impl.SparseVertex V6 class edu.uci.ics.jung.graph.impl.SparseVertex V8 class edu.uci.ics.jung.graph.impl.SparseVertex V10 But why does the method return Node V6, V8 and V10?? I expect and double value of the Cluster Coeffizient of the Node or of the whole network... ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=252062 |