[ Index ]
 

Code source de PHP PEAR 1.4.5

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

title

Body

[fermer]

/Structures/Graph/Manipulator/ -> AcyclicTest.php (sommaire)

This file contains the definition of the Structures_Graph_Manipulator_AcyclicTest graph manipulator.

Poids: 136 lignes (6 kb)
Inclus ou requis: 1 fois
Référencé: 4 fois
Nécessite: 3 fichiers
 Structures/Graph/Node.php
 PEAR.php
 Structures/Graph.php

Définit 1 class

Structures_Graph_Manipulator_AcyclicTest:: (3 méthodes):
  _nonVisitedInDegree()
  _isAcyclic()
  isAcyclic()


Classe: Structures_Graph_Manipulator_AcyclicTest  - X-Ref

The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator
which tests whether a graph contains a cycle.

The definition of an acyclic graph used in this manipulator is that of a
DAG. The graph must be directed, or else it is considered cyclic, even when
there are no arcs.

_nonVisitedInDegree(&$node)   X-Ref
This is a variant of Structures_Graph::inDegree which does
not count nodes marked as visited.

return: integer     Number of non-visited nodes that link to this one

_isAcyclic(&$graph)   X-Ref


isAcyclic(&$graph)   X-Ref
isAcyclic returns true if a graph contains no cycles, false otherwise.

return: boolean     true iff graph is acyclic



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