Commit 0e3b5d67 authored by EYRAUD-DUBOIS Lionel's avatar EYRAUD-DUBOIS Lionel

Debug rank computing when there is no dependency

parent 018ede3b
......@@ -319,9 +319,12 @@ vector<double> Instance::computeRanks(vector<double> wbar, int to, int from) {
int i = topOrder[j];
// Compute max
double m = -std::numeric_limits<double>::infinity();
for(int k = 0; k < (int) revDep[i].size(); k++)
if(revDep[i].empty())
m = 0;
else
for(int k = 0; k < (int) revDep[i].size(); k++)
if(rank[revDep[i][k]] > m)
m = rank[revDep[i][k]];
m = rank[revDep[i][k]];
rank[i] = wbar[i] + m;
if (topOrder[j] == from)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment