for (Node<NodeData, EdgeData> n : nodes) {
List<Edge<NodeData, EdgeData>> edges = new ArrayList<Edge<NodeData, EdgeData>>(n.getOutEdges());
for (Edge<NodeData, EdgeData> e : edges) {
edgeCount++;
Link edge = e.getData().getEdge();
Node<NodeData, EdgeData> destNode = e.getDest();
Node<NodeData, EdgeData> lastNode = n;
Edge<NodeData, EdgeData> lastEdge = e;
boolean searchForNode = (combine != Combine.NONE);
for (int i = n.getData().getLayer() + 1; i < destNode.getData().getLayer(); i++) {
Node<NodeData, EdgeData> foundNode = null;
if (searchForNode) {
for (Node<NodeData, EdgeData> sameLayerNode : layers[i]) {
innerMostLoop++;
if (combine == Combine.SAME_OUTPUTS) {
if (sameLayerNode.getData().isDummy() && sameLayerNode.getData().getEdge().getFrom() == edge.getFrom()) {
foundNode = sameLayerNode;
break;
}
} else if (combine == Combine.SAME_INPUTS) {
if (sameLayerNode.getData().isDummy() && sameLayerNode.getData().getEdge().getTo() == edge.getTo()) {
foundNode = sameLayerNode;
break;
}
}
}