|
||||||||||
| 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 SingleSourceShortestPath<CostType>
An object implementing this encapsulates an algorithm able to solve the single source shortest path problem. I.e. it can find the shortest path(s) from a given start node to all other nodes in a network.
| Method Summary | |
|---|---|
CostType |
getCost(Node targetNode)
A call to this will run the algorithm, if not already done, and return the cost for the shortest paths between the start node and the target node. |
Direction |
getDirection()
This can be used to retrieve the Direction in which relationships should be in the shortest path(s). |
List<PropertyContainer> |
getPath(Node targetNode)
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(Node targetNode)
A call to this will run the algorithm, if not already done, and return the found path to the target node if found as a list of nodes. |
List<Relationship> |
getPathAsRelationships(Node targetNode)
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(Node targetNode)
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(Node targetNode)
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(Node targetNode)
A call to this will run the algorithm to find all shortest paths, if not already done, and return them as lists of relationships. |
List<Node> |
getPredecessorNodes(Node node)
|
Map<Node,List<Relationship>> |
getPredecessors()
This can be used to retrieve the entire data structure representing the predecessors for every node. |
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 |
setStartNode(Node node)
This sets the start node. |
| Method Detail |
|---|
void reset()
void setStartNode(Node node)
node - The start node.List<PropertyContainer> getPath(Node targetNode)
List<Node> getPathAsNodes(Node targetNode)
List<Relationship> getPathAsRelationships(Node targetNode)
List<List<PropertyContainer>> getPaths(Node targetNode)
List<List<Node>> getPathsAsNodes(Node targetNode)
List<List<Relationship>> getPathsAsRelationships(Node targetNode)
CostType getCost(Node targetNode)
List<Node> getPredecessorNodes(Node node)
node -
Map<Node,List<Relationship>> getPredecessors()
Direction getDirection()
RelationshipType[] getRelationshipTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||