private function findGraphCycle(array $graph, $seed = 'A', $search = 'A')
 {
     $detector = new TestAbstractDirectedGraph();
     $detector->setTestData($graph);
     $detector->addNodes(array_select_keys($graph, array($seed)));
     $detector->loadGraph();
     return $detector->detectCycles($search);
 }
 private function getTopographicSort(array $graph, $seed = 'A')
 {
     $detector = new TestAbstractDirectedGraph();
     $detector->setTestData($graph);
     $detector->addNodes(array_select_keys($graph, array($seed)));
     $detector->loadGraph();
     return $detector->getTopographicallySortedNodes();
 }
 private function getBestEffortTopographicSort(array $graph)
 {
     $detector = new TestAbstractDirectedGraph();
     $detector->setTestData($graph);
     $detector->addNodes(array_keys($graph));
     return $detector->getBestEffortTopographicallySortedNodes();
 }