![]() |
Bearsampp 2026.9.23
|
Static Public Member Functions | |
| static | sort (&$graph) |
Static Protected Member Functions | |
| static | _nonVisitedInDegree (&$node) |
| static | _sort (&$graph) |
Definition at line 50 of file TopologicalSorter.php.
|
staticprotected |
This is a variant of Structures_Graph::inDegree which does not count nodes marked as visited.
| object | $node | Node to check |
Definition at line 60 of file TopologicalSorter.php.
References $result.
|
staticprotected |
Sort implementation
| object | $graph | Graph to sort |
Definition at line 82 of file TopologicalSorter.php.
Referenced by sort().
|
static |
Sort returns the graph's nodes, sorted by topological order.
The result is an array with as many entries as topological levels. Each entry in this array is an array of nodes within the given topological level.
| object | $graph | Graph to sort |
Definition at line 139 of file TopologicalSorter.php.
References $result, _sort(), Structures_Graph_Manipulator_AcyclicTest\isAcyclic(), and STRUCTURES_GRAPH_ERROR_GENERIC.
Referenced by PEAR_Downloader\sortPackagesForInstall(), and TopologicalSorterTest\testSort().