Pārlūkot izejas kodu

FIX: DependencyGraph: Cycle detection failed for example on 1->2->1.
Using usual cycle detection by checking if vertex has arleady been discovered instead.

Sascha Zelzer 15 gadi atpakaļ
vecāks
revīzija
3e71205594
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Libs/Core/ctkDependencyGraph.cpp

+ 1 - 1
Libs/Core/ctkDependencyGraph.cpp

@@ -163,7 +163,7 @@ void ctkDependencyGraph::ctkInternal::traverseUsingDFS(int v)
 //----------------------------------------------------------------------------
 void ctkDependencyGraph::ctkInternal::processEdge(int from, int to)
 {
-  if (this->Parent[from] != to)
+  if (this->Discovered[to] == true)
     {
     this->CycleDetected = true;
     this->CycleOrigin = to;