PHP Class Trismegiste\Mondrian\Graph\DepthFirstSearch

Uses the depth first search method : not always the shortest path
Inheritance: extends Algorithm
Mostra file Open project: trismegiste/mondrian

Protected Properties

Property Type Description
$stack

Public Methods

Method Description
searchPath ( Vertex $src, Vertex $dst ) : Edge[] Finds a directed path from $src to $dst

Protected Methods

Method Description
recursivSearchPath ( Vertex $src, Vertex $dst ) : boolean Recursive search

Method Details

recursivSearchPath() protected method

Recursive search
protected recursivSearchPath ( Vertex $src, Vertex $dst ) : boolean
$src Vertex
$dst Vertex
return boolean

searchPath() public method

Finds a directed path from $src to $dst
public searchPath ( Vertex $src, Vertex $dst ) : Edge[]
$src Vertex starting point
$dst Vertex ending point
return Edge[] the path or empty array

Property Details

$stack protected_oe property

protected $stack