Dear *,
I am having an unexplainable problem with the getEdgeSource(vertex)
method, somehow the changes I make on the received nodes are not
reflected on the graph, for getEdgeTarget(vertex) on the other hand,
this works without problems. Do you have any idea why this happens?
mGraph = (DirectedGraph<Node, DefaultEdge>)
((AbstractBaseGraph)graph).clone();
// iterate over every node (i have also tested this with
various iterators)
for (Node node : mGraph.vertexSet()) {
// iterate over ingoing edges. this loop should only
run once since we check indegree == 1
for (DefaultEdge edge : mGraph.incomingEdgesOf(node)) {
Node source = graph.getEdgeSource(edge);
source.size++; // this size is not increased later
}
}
I also tried using the EdgeReversedGraph, but there the problem exists
too (for reversed getEdgeTarget/Source). Moreover I also tried changing
the nodes after I iterated over the graph
Best Regards
Tobias
|