|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.graphalgo.impl.util.WeightedPathImpl
public class WeightedPathImpl
| Constructor Summary | |
|---|---|
WeightedPathImpl(CostEvaluator<Double> costEvaluator,
Path path)
|
|
WeightedPathImpl(double weight,
Path path)
|
|
| Method Summary | |
|---|---|
Node |
endNode()
Returns the end node of this path. |
Iterator<PropertyContainer> |
iterator()
Iterates through both the Nodes and Relationships of this
path in order. |
Relationship |
lastRelationship()
Returns the last Relationship in this path. |
int |
length()
Returns the length of this path. |
Iterable<Node> |
nodes()
Returns all the nodes in this path. |
Iterable<Relationship> |
relationships()
Returns all the relationships in between the nodes which this path consists of. |
Node |
startNode()
Returns the start node of this path. |
String |
toString()
Returns a natural string representation of this path. |
double |
weight()
Returns the weight of the path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WeightedPathImpl(CostEvaluator<Double> costEvaluator,
Path path)
public WeightedPathImpl(double weight,
Path path)
| Method Detail |
|---|
public double weight()
WeightedPath
weight in interface WeightedPathpublic Node startNode()
PathPath.nodes() iterable.
startNode in interface Pathpublic Node endNode()
PathPath.nodes() iterable. If the Path.length() of this path
is 0 the end node returned by this method is the same as the start node.
If a path is emitted from a traverser the end node is the current node
where the traverser is at the moment.
endNode in interface Pathpublic Relationship lastRelationship()
PathRelationship in this path.
lastRelationship in interface PathRelationship in this path, or null
if this path contains no Relationships.public int length()
Path
length in interface Pathpublic Iterable<Node> nodes()
PathPath.startNode() and the last node is the same as Path.endNode().
In between those nodes there can be an arbitrary number of nodes. The
shortest path possible is just one node, where also the the start node is
the same as the end node.
nodes in interface Pathpublic Iterable<Relationship> relationships()
Path
relationships in interface Pathpublic String toString()
Path
toString in interface PathtoString in class Objectpublic Iterator<PropertyContainer> iterator()
PathNodes and Relationships of this
path in order. Interleaving Nodes with Relationships,
starting and ending with a Node (the Path.startNode() and
Path.endNode() respectively).
iterator in interface Iterable<PropertyContainer>iterator in interface PathIterable.iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||