Structures_Graph
[ class tree: Structures_Graph ] [ index: Structures_Graph ] [ all elements ]

Class: Structures_Graph_Manipulator_TopologicalSorter

Source Location: /Structures_Graph-1.0.4/Structures/Graph/Manipulator/TopologicalSorter.php

Class Overview


The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.


Author(s):

Copyright:

  • (c) 2004 by SÚrgio Carvalho

Methods


Inherited Variables

Inherited Methods


Class Details

[line 58]
The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.

A graph may only be sorted topologically iff it's a DAG. You can test it with the Structures_Graph_Manipulator_AcyclicTest.



[ Top ]


Method Detail

sort   [line 131]

array sort( &$graph)

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.

  • Return: The graph's nodes, sorted by topological order.
  • Access: public

Parameters:

   &$graph     

[ Top ]


Documentation generated on Tue, 26 Oct 2010 04:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.