X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mtp_graph.cc;h=2abe52b543fe9b6190c47d6da55f678af66bcd0d;hb=656afdeaf084a2b7d173f3710678d0c9bb0cc90a;hp=6fb38779089287fd0f3fb312a50733e14e9283ff;hpb=d61402c073c55b30b1e06f091ffd9c884acc01a0;p=mtp.git diff --git a/mtp_graph.cc b/mtp_graph.cc index 6fb3877..2abe52b 100644 --- a/mtp_graph.cc +++ b/mtp_graph.cc @@ -457,6 +457,11 @@ void MTPGraph::compute_dp_ordering() { } while(already_processed < front) { + // Here, nodes before already_processed can be ignored, nodes + // before front were set to 0 predecessors during the previous + // iteration. During this new iteration, we have to visit the + // successors of these ones only, since they are the only ones + // potentially having now predecessors anymore. new_front = front; while(already_processed < front) { v = *(already_processed++);