Path

Represents a sequence of alternating nodes and relationships corresponding to a walk in a labeled property graph.

A path of length L consists of L + 1 nodes indexed from 0 to L, and L unbound relationships, indexed from 0 to L - 1. Each relationship has a direction. A relationship is said to be reversed if it was traversed in the direction opposite of the direction of the underlying relationship in the data graph.

Constructors

this
this(Path other)

Create a copy of other path.

this
this(Value value)

Create a path from a Value.

this
this(mg_path* ptr)

Create a Path using the given mg_path.

this
this(mg_path* ptr)

Create a Path from a copy of the given mg_path.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

getNodeAt
const(Node) getNodeAt(uint index)

Returns the vertex at the given index. index should be less than or equal to length of the path.

getRelationshipAt
const(UnboundRelationship) getRelationshipAt(uint index)

Returns the edge at the given index. index should be less than length of the path.

isReversedRelationshipAt
bool isReversedRelationshipAt(uint index)

Returns the orientation of the edge at the given index. index should be less than length of the path. Return: True if the edge is reversed, false otherwise.

length
const(long) length()

Returns the path length. Length of the path is number of edges.

opEquals
bool opEquals(Path other)

Compares this path with other. Return: true if same, false otherwise.

ptr
const(mg_path*) ptr()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
const(string) toString()

Return a printable string representation of this path.

Meta