[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Structures/ -> Graph.php (sommaire)

The Graph.php file contains the definition of the Structures_Graph class

Poids: 154 lignes (6 kb)
Inclus ou requis: 7 fois
Référencé: 6 fois
Nécessite: 2 fichiers
 Structures/Graph/Node.php
 PEAR.php

Définit 1 class

Structures_Graph:: (5 méthodes):
  Structures_Graph()
  isDirected()
  addNode()
  removeNode()
  getNodes()


Classe: Structures_Graph  - X-Ref

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.

Structures_Graph($directed = true)   X-Ref
Constructor

param: boolean    Set to true if the graph is directed. Set to false if it is not directed. (Optional, defaults to true)

isDirected()   X-Ref
Return true if a graph is directed

return: boolean     true if the graph is directed

addNode(&$newNode)   X-Ref
Add a Node to the Graph

param: Structures_Graph_Node   The node to be added.

removeNode(&$node)   X-Ref
Remove a Node from the Graph

param: Structures_Graph_Node   The node to be removed from the graph

getNodes()   X-Ref
Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.

return: array The set of nodes in this graph



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7