Hi,I am trying to display a graph with 457555 edges but it shows up as a single dot on my computer. If I limit to 5000 edges, it shows a graph as attached below. Is there a reason why it's doing this? I am using a hashmap to store the edges and the following code to construct the graph. Thank you very much for your help.private static void displayGraph(HashMap<UserPair, TrustRelation> map) {
Graph graph = new SingleGraph("Trust");
graph.setStrict(false);
graph.setAutoCreate( true );
graph.addAttribute("ui.stylesheet", STYLE_SHEET);
for(Map.Entry<UserPair, TrustRelation> entry : map.entrySet()){
UserPair up = entry.getKey();
TrustRelation tr = entry.getValue();
double strengthOfTrust = tr.computeConversationalTrust();
if (strengthOfTrust > 0) {
Edge edge = graph.addEdge(up.toString(), Integer.toString(up.getUserA()), Integer.toString(up.getUserB()));
edge.addAttribute("weight", strengthOfTrust);
edge.addAttribute("ui.class", "untrustworthy");
edge.addAttribute("ui.class", "trustworthy");
edge.setAttribute("ui.color", strengthOfTrust/4.0);
}
}
graph.display();
}Kind regards,Cherie
Archives gérées par MHonArc 2.6.16.