int rangeStart = rangeNode.getPre();
int rangeLimit = rangeStart + rangeNode.size;
if (enabledNode.getMetaEdgesOutTree().getCount() > 0) {
edgeIterator.setNode(enabledNode.getMetaEdgesOutTree());
while (edgeIterator.hasNext()) {
MetaEdgeImpl metaEdge = (MetaEdgeImpl) edgeIterator.next();
AbstractNode target = metaEdge.getTarget(viewId);
int targetPre = target.getPre();
if (targetPre >= rangeStart && targetPre <= rangeLimit) {
//The meta edge has to be removed because it's in the range
if (!metaEdge.isSelfLoop() && target.getEdgesInTree().hasNeighbour(enabledNode)) {
enabledNode.decMutualMetaEdgeDegree();
target.decMutualMetaEdgeDegree();
view.decMutualMetaEdgesTotal(1);
}
edgeIterator.remove();
target.getMetaEdgesInTree().remove(metaEdge);
view.decMetaEdgesCount(1);
}
}
}
if (enabledNode.getMetaEdgesInTree().getCount() > 0) {
edgeIterator.setNode(enabledNode.getMetaEdgesInTree());
while (edgeIterator.hasNext()) {
MetaEdgeImpl metaEdge = (MetaEdgeImpl) edgeIterator.next();
int sourcePre = metaEdge.getSource(viewId).getPre();
if (sourcePre >= rangeStart && sourcePre <= rangeLimit) {
//The meta edge has to be removed because it's in the range
edgeIterator.remove();
metaEdge.getSource(viewId).getMetaEdgesOutTree().remove(metaEdge);
view.decMetaEdgesCount(1);
}
}
}
}