- From: <mhn.namak AT gmail.com>
- To: graphstream-users AT litislab.fr
- Subject: getting information of new added/deleted edges
- Date: Thu, 11 Aug 2016 05:03:04 +0200 (CEST)
Hi all,
I want to use "graphstream" software to get a synthetic graph stream. However,
I don't need to visualize it. I just want to get the new edges/nodes per
request or in a batch mode.
My requirement is like the following:
- the graph model (e.g. BarabasiAlbert, ....)
- number of node/edges in total.
- streaming of edges in an ordered manner
The following code gives me the graph. However, in each event, I don't know
what are the new edges to have their order.
Is there any method that I can use to see what is the srcNodeId --> destNodeId
of the next streaming edge?
Graph graph = new SingleGraph("test1");
Generator generator = new
BarabasiAlbertGenerator(maxEdgePerEvent);
generator.addSink(graph);
generator.begin();
for (int i = 0; i < numberOfNodes; i++) {
generator.nextEvents(); //which edges/nodes were
added?
}
for (Node node : graph) {
node.addAttribute("ui.label", node.getId());
}
Thanks
- getting information of new added/deleted edges, mhn.namak, 11/08/2016
Archives gérées par MHonArc 2.6.16.