Property | Type | Description | |
---|---|---|---|
$endingVertex | |||
$graph | |||
$paths | |||
$solution | |||
$startingVertex |
Method | Description | |
---|---|---|
__construct ( Doctrine\OrientDB\Graph\GraphInterface $graph ) | Instantiates a new algorithm, requiring a graph to work with. | |
getDistance ( ) : integer | Returns the distance between the starting and the ending point. | |
getEndingVertex ( ) : Doctrine\OrientDB\Graph\VertexInterface | Gets the vertex which we are pointing to. | |
getLiteralShortestPath ( ) : string | Returns the solution in a human-readable style. | |
getShortestPath ( ) : Array | Reverse-calculates the shortest path of the graph thanks the potentials stored in the vertices. | |
getStartingVertex ( ) : Doctrine\OrientDB\Graph\VertexInterface | Retrieves the vertex which we are starting from to calculate the shortest path. | |
setEndingVertex ( Doctrine\OrientDB\Graph\VertexInterface $vertex ) | Sets the vertex which we are pointing to. | |
setStartingVertex ( Doctrine\OrientDB\Graph\VertexInterface $vertex ) | Sets the vertex which we are starting from to calculate the shortest path. | |
solve ( ) |
Method | Description | |
---|---|---|
calculatePotentials ( Doctrine\OrientDB\Graph\VertexInterface $vertex ) | Recursively calculates the potentials of the graph, from the starting point you specify with ->setStartingVertex(), traversing the graph due to Vertex's $connections attribute. | |
getGraph ( ) : Doctrine\OrientDB\Graph\GraphInterface | Returns the graph associated with this algorithm instance. | |
getPaths ( ) : Array | Returns the possible paths registered in the graph. | |
isSolved ( ) : boolean | Checks wheter the current algorithm has been solved or not. |
public __construct ( Doctrine\OrientDB\Graph\GraphInterface $graph ) | ||
$graph | Doctrine\OrientDB\Graph\GraphInterface |
protected calculatePotentials ( Doctrine\OrientDB\Graph\VertexInterface $vertex ) | ||
$vertex | Doctrine\OrientDB\Graph\VertexInterface |
public getDistance ( ) : integer | ||
return | integer |
public getEndingVertex ( ) : Doctrine\OrientDB\Graph\VertexInterface | ||
return | Doctrine\OrientDB\Graph\VertexInterface |
protected getGraph ( ) : Doctrine\OrientDB\Graph\GraphInterface | ||
return | Doctrine\OrientDB\Graph\GraphInterface |
public getLiteralShortestPath ( ) : string | ||
return | string |
protected getPaths ( ) : Array | ||
return | Array |
public getShortestPath ( ) : Array | ||
return | Array |
public getStartingVertex ( ) : Doctrine\OrientDB\Graph\VertexInterface | ||
return | Doctrine\OrientDB\Graph\VertexInterface |
public setEndingVertex ( Doctrine\OrientDB\Graph\VertexInterface $vertex ) | ||
$vertex | Doctrine\OrientDB\Graph\VertexInterface |
public setStartingVertex ( Doctrine\OrientDB\Graph\VertexInterface $vertex ) | ||
$vertex | Doctrine\OrientDB\Graph\VertexInterface |