Minor fix

This commit is contained in:
Alexey Andreev 2015-03-04 22:57:26 +03:00
parent d4824ff9d2
commit 04677d0103

View File

@ -37,7 +37,7 @@ public class DefaultGraphSplittingBackend implements GraphSplittingBackend {
index = graph.size(); index = graph.size();
for (int i = 0; i < graph.size(); ++i) { for (int i = 0; i < graph.size(); ++i) {
prototypeNodes.add(i); prototypeNodes.add(i);
copyIndexes.add(i); copyIndexes.add(0);
} }
} }
@ -59,7 +59,7 @@ public class DefaultGraphSplittingBackend implements GraphSplittingBackend {
IntIntMap map = new IntIntOpenHashMap(); IntIntMap map = new IntIntOpenHashMap();
for (int i = 0; i < nodes.length; ++i) { for (int i = 0; i < nodes.length; ++i) {
copies[i] = index++; copies[i] = index++;
map.put(nodes[i], copies[i]); map.put(nodes[i], copies[i] + 1);
int proto = prototypeNodes.get(nodes[i]); int proto = prototypeNodes.get(nodes[i]);
prototypeNodes.add(proto); prototypeNodes.add(proto);
copyIndexes.add(++copyCount[proto]); copyIndexes.add(++copyCount[proto]);