Class Structures_Graph

Description

The Structures_Graph class represents a graph data structure.

A Graph is a data structure composed by a set of nodes, connected by arcs. Graphs may either be directed or undirected. In a directed graph, arcs are directional, and can be traveled only one way. In an undirected graph, arcs are bidirectional, and can be traveled both ways.

Located in /Structures/Graph.php (line 56)


	
			
Method Summary
Structures_Graph Structures_Graph ([boolean $directed = true])
void addNode (Structures_Graph_Node &$newNode)
array &getNodes ()
boolean isDirected ()
Methods
Constructor Structures_Graph (line 76)

Constructor

  • access: public
Structures_Graph Structures_Graph ([boolean $directed = true])
  • boolean $directed: Set to true if the graph is directed. Set to false if it is not directed. (Optional, defaults to true)
addNode (line 102)

Add a Node to the Graph

  • access: public
void addNode (Structures_Graph_Node &$newNode)
getNodes (line 151)

Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.

array &getNodes ()
isDirected (line 89)

Return true if a graph is directed

  • return: true if the graph is directed
  • access: public
boolean isDirected ()
removeNode (line 138)

Remove a Node from the Graph

  • access: public
  • todo: This is unimplemented
void removeNode (Structures_Graph_Node &$node)

Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by phpDocumentor 1.2.3