|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
CostType - The datatype the edge weights are represented by.public interface SingleSourceSingleSinkShortestPath<CostType>
An object implementing this encapsulates an algorithm able to solve the single source single sink shortest path problem. I.e. it can find the shortest path(s) between two given nodes in a network.
| Method Summary | |
|---|---|
CostType |
getCost()
A call to this will run the algorithm to find the cost for the shortest paths between the start node and the end node, if not calculated before. |
Direction |
getDirection()
This can be used to retrieve the Direction in which relationships should be in the shortest path(s). |
List<PropertyContainer> |
getPath()
A call to this will run the algorithm to find a single shortest path, if not already done, and return it as an alternating list of Node/Relationship. |
List<Node> |
getPathAsNodes()
A call to this will run the algorithm to find a single shortest path, if not already done, and return it as a list of nodes. |
List<Relationship> |
getPathAsRelationships()
A call to this will run the algorithm to find a single shortest path, if not already done, and return it as a list of Relationships. |
List<List<PropertyContainer>> |
getPaths()
A call to this will run the algorithm to find all shortest paths, if not already done, and return them as alternating lists of Node/Relationship. |
List<List<Node>> |
getPathsAsNodes()
A call to this will run the algorithm to find all shortest paths, if not already done, and return them as lists of nodes. |
List<List<Relationship>> |
getPathsAsRelationships()
A call to this will run the algorithm to find all shortest paths, if not already done, and return them as lists of relationships. |
RelationshipType[] |
getRelationshipTypes()
This can be used to retrieve the types of relationships that are traversed. |
void |
reset()
This resets the calculation if we for some reason would like to redo it. |
void |
setEndNode(Node node)
This sets the end node. |
void |
setStartNode(Node node)
This sets the start node. |
| Method Detail |
|---|
void reset()
void setStartNode(Node node)
node - The start node.void setEndNode(Node node)
node - The end node.List<PropertyContainer> getPath()
List<Node> getPathAsNodes()
List<Relationship> getPathAsRelationships()
List<List<PropertyContainer>> getPaths()
List<List<Node>> getPathsAsNodes()
List<List<Relationship>> getPathsAsRelationships()
CostType getCost()
Direction getDirection()
RelationshipType[] getRelationshipTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||