Open pranavgaba11 opened 7 years ago
It looks like you are missing cast
try x=(Double) n.getAttribute("Cb");
Please provide us a simple and self contained example (SSCCE) so we can try to help you.
Were you able to solve the problem and get the betweeness centrality of each node @pranavgaba11 ?? I am stuck with the same problem. Please let me know if you found a solution.
I am using Graphstream library in java to implement and find betweenness centrality of the nodes in the graph. When I specifically find out for a node like
nodeA.getAttribute("Cb")
it works fine. But when I calculate it for the whole graph using a for loop it gives errorThis is a loop where I will find degree centrality and betweenness centrality and combine both and put them in a hash map. So, I am getting error in
float x=n.getAttribute("Cb");
The error is-Whereas when I find it for only a single node like if the node in the graphs are A,B,C,D,E
This way it works perfectly fine.
Can please someone help fix my code. Thanks in advance.