$graph
$graph :
DepthFirstSearch is a decorator for digraph to find a directed path between two vertices.
Uses the depth first search method : not always the shortest path
__construct(\Trismegiste\Mondrian\Graph\Graph $g)
Decorates the graph
\Trismegiste\Mondrian\Graph\Graph | $g |
addEdge(\Trismegiste\Mondrian\Graph\Vertex $source, \Trismegiste\Mondrian\Graph\Vertex $target)
Add a (un)directed edge if it does not already exist
\Trismegiste\Mondrian\Graph\Vertex | $source | |
\Trismegiste\Mondrian\Graph\Vertex | $target |
addVertex(\Trismegiste\Mondrian\Graph\Vertex $v)
Add a vertex to the graph without edge
\Trismegiste\Mondrian\Graph\Vertex | $v |
searchEdge(\Trismegiste\Mondrian\Graph\Vertex $source, \Trismegiste\Mondrian\Graph\Vertex $target) : \Trismegiste\Mondrian\Graph\Edge
Searches an existing (directed or not) edge between two vertices
\Trismegiste\Mondrian\Graph\Vertex | $source | |
\Trismegiste\Mondrian\Graph\Vertex | $target |
getSuccessor(\Trismegiste\Mondrian\Graph\Vertex $v) : null|array
Get successors of a vertex
\Trismegiste\Mondrian\Graph\Vertex | $v |
null if the vertex is not in this graph
or an array of vertices
getEdgeIterator(\Trismegiste\Mondrian\Graph\Vertex $v) : \Trismegiste\Mondrian\Graph\Iterator
Get an iterator on edges for one vertex
\Trismegiste\Mondrian\Graph\Vertex | $v |
searchPath(\Trismegiste\Mondrian\Graph\Vertex $src, \Trismegiste\Mondrian\Graph\Vertex $dst) : array<mixed,\Trismegiste\Mondrian\Graph\Edge>
Finds a directed path from $src to $dst
\Trismegiste\Mondrian\Graph\Vertex | $src | starting point |
\Trismegiste\Mondrian\Graph\Vertex | $dst | ending point |
the path or empty array
recursivSearchPath(\Trismegiste\Mondrian\Graph\Vertex $src, \Trismegiste\Mondrian\Graph\Vertex $dst) : boolean
Recursive search
\Trismegiste\Mondrian\Graph\Vertex | $src | |
\Trismegiste\Mondrian\Graph\Vertex | $dst |