Gliph\Graph\Digraph::inDegreeOf PHP Method

inDegreeOf() public method

In undirected graphs, in-degree and out-degree are the same.
public inDegreeOf ( object $vertex ) : integer
$vertex object The vertex for which to retrieve in-degree information.
return integer
    public function inDegreeOf($vertex);

Usage Example

Esempio n. 1
0
 public function process(Vertex $vertex, Digraph $graph)
 {
     if ($graph->inDegreeOf($vertex) === 0 && !$vertex instanceof Vertex\Function_) {
         Helper::remove($vertex, $graph);
         return true;
     }
     return false;
 }