//int dest = destIter.next();
int dest = list[w];
Arrays.fill(spfs[dest], Double.POSITIVE_INFINITY);
Arrays.fill(lpfs[dest], Double.NEGATIVE_INFINITY);
StoredIndexedBipartiteSet bs = graph.GNodes.inArcs[dest];
assert (!bs.isEmpty());
final int[] inlist = bs._getStructure();
final int insize = bs.size();
for (int x = 0; x < insize; x++) //while (in.hasNext())
{
int e = inlist[x];//in.next();
if (!graph.isInStack(e)) {
int orig = graph.GArcs.origs[e];//.getDestination();
double[] cost = graph.GArcs.originalCost[e];
// double[] newCost = addArray(spfs[orig],cost);//cost[i][graph.GArcs.values[e]];
for (int d = 0; d < nbr; d++) {
if (spfs[dest][d] > cost[d] + spfs[orig][d]) {
spfs[dest][d] = cost[d] + spfs[orig][d];
prevSP[dest][d] = e;
update = true;
}
if (lpfs[dest][d] < lpfs[orig][d] + cost[d]) {
lpfs[dest][d] = lpfs[orig][d] + cost[d];
prevLP[dest][d] = e;
update = true;
}
}
}
}
// in.dispose();
}
// destIter.dispose();
if (!update) propagator.contradiction(null, "no update");
}
for (int i = nbLayer - 1; i >= 0; i--) {
update = false;
//DisposableIntIterator origIter = graph.layers[i].getIterator();
int[] list = graph.layers[i]._getStructure();
int size = graph.layers[i].size();
//while(origIter.hasNext()){
for (int w = size - 1; w >= 0; w--) {
//int orig = origIter.next();
int orig = list[w];
Arrays.fill(spft[orig], Double.POSITIVE_INFINITY);
Arrays.fill(lpft[orig], Double.NEGATIVE_INFINITY);
StoredIndexedBipartiteSet bs = graph.GNodes.outArcs[orig];
assert (!bs.isEmpty());
final int[] outlist = bs._getStructure();//getIterator();
final int outsize = bs.size();
for (int x = 0; x < outsize; x++) //while (out.hasNext())
{
int e = outlist[x];//out.next();
if (!graph.isInStack(e)) {
int dest = graph.GArcs.dests[e];//e.getOrigin() ;