Forum Discussion
Altera_Forum
Honored Contributor
12 years ago1) Ask anything you like, no guarantee it will get answered.
2) If you haven't fixed this already, I suggest you replace: this: newdist = dc + w[current];
with:
if(w[current] != INFINITY) { newdist = dc + w[current][i]; } else { newdist = INFINITY; } I think you end up adding a positive number to INFINITY which gives you a large negative that incorrectly satisfies your check for "less than".