From cc2c32d1cd8f5e1b965ab9b325a0fb16dc2290bb Mon Sep 17 00:00:00 2001 From: morpheusthewhite Date: Thu, 2 Jul 2020 09:45:13 +0200 Subject: [PATCH] Fix path comparison --- src/GraphParallelDFS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GraphParallelDFS.cpp b/src/GraphParallelDFS.cpp index c07bc07..752196d 100644 --- a/src/GraphParallelDFS.cpp +++ b/src/GraphParallelDFS.cpp @@ -184,7 +184,7 @@ void GraphParallelDFS::convertToDT() { // update the path in the case in which // - The path is empty, so this is the first time we meet this child // - We found a path Br which is better than the current one - if(Qr.empty() || Br <= Qr){ + if(this->parents[child] == -1 || Br <= Qr){ paths[child] = Br; // the previous one, if existing, is a parent in the dag which is not present in the dt