PHP Класс Doctrine\OrientDB\Graph\Algorithm\Dijkstra

Наследование: implements Doctrine\OrientDB\Graph\Algorithm\AlgorithmInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$endingVertex
$graph
$paths
$solution
$startingVertex

Открытые методы

Метод Описание
__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 ( )

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный метод

Instantiates a new algorithm, requiring a graph to work with.
public __construct ( Doctrine\OrientDB\Graph\GraphInterface $graph )
$graph Doctrine\OrientDB\Graph\GraphInterface

calculatePotentials() защищенный метод

Recursively calculates the potentials of the graph, from the starting point you specify with ->setStartingVertex(), traversing the graph due to Vertex's $connections attribute.
protected calculatePotentials ( Doctrine\OrientDB\Graph\VertexInterface $vertex )
$vertex Doctrine\OrientDB\Graph\VertexInterface

getDistance() публичный метод

Returns the distance between the starting and the ending point.
public getDistance ( ) : integer
Результат integer

getEndingVertex() публичный метод

Gets the vertex which we are pointing to.
public getEndingVertex ( ) : Doctrine\OrientDB\Graph\VertexInterface
Результат Doctrine\OrientDB\Graph\VertexInterface

getGraph() защищенный метод

Returns the graph associated with this algorithm instance.
protected getGraph ( ) : Doctrine\OrientDB\Graph\GraphInterface
Результат Doctrine\OrientDB\Graph\GraphInterface

getLiteralShortestPath() публичный метод

Returns the solution in a human-readable style.
public getLiteralShortestPath ( ) : string
Результат string

getPaths() защищенный метод

Returns the possible paths registered in the graph.
protected getPaths ( ) : Array
Результат Array

getShortestPath() публичный метод

Reverse-calculates the shortest path of the graph thanks the potentials stored in the vertices.
public getShortestPath ( ) : Array
Результат Array

getStartingVertex() публичный метод

Retrieves the vertex which we are starting from to calculate the shortest path.
public getStartingVertex ( ) : Doctrine\OrientDB\Graph\VertexInterface
Результат Doctrine\OrientDB\Graph\VertexInterface

isSolved() защищенный метод

Checks wheter the current algorithm has been solved or not.
protected isSolved ( ) : boolean
Результат boolean

setEndingVertex() публичный метод

Sets the vertex which we are pointing to.
public setEndingVertex ( Doctrine\OrientDB\Graph\VertexInterface $vertex )
$vertex Doctrine\OrientDB\Graph\VertexInterface

setStartingVertex() публичный метод

Sets the vertex which we are starting from to calculate the shortest path.
public setStartingVertex ( Doctrine\OrientDB\Graph\VertexInterface $vertex )
$vertex Doctrine\OrientDB\Graph\VertexInterface

solve() публичный метод

public solve ( )

Описание свойств

$endingVertex защищенное свойство

protected $endingVertex

$graph защищенное свойство

protected $graph

$paths защищенное свойство

protected $paths

$solution защищенное свойство

protected $solution

$startingVertex защищенное свойство

protected $startingVertex