PHP 클래스 Doctrine\OrientDB\Graph\Algorithm\Dijkstra

상속: implements Doctrine\OrientDB\Graph\Algorithm\AlgorithmInterface
파일 보기 프로젝트 열기: doctrine/orientdb-odm 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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