Graph.Edge

Constructors

this
this(Node start, Node end)
this(Node start, Node end, Weight weight)
this(Node start, Node end, EdgePayload payload)
this(Node start, Node end, Weight weight, EdgePayload payload)

Construct an edge.

Members

Functions

getConnectingNode
Node getConnectingNode(in Edge other)

Returns the node that is connects this edge with other edge. In case of undirected graphs this is just the common node of both edges; in directed case this is the end node of this edge if it matches the start node of other edge.

opCmp
int opCmp(in Edge other)

Orders edge lexicographically by start, end(, weight).

opEquals
bool opEquals(in Edge other)

Two edges are equal iff their incident nodes (and weight) are the same.

source
Node source(Node from)

Get source of this edge beginning at node from. For undirected graphs returns the other node of this edge.

target
Node target(Node from)

Get target of this edge beginning at node from. For undirected graphs returns the other node of this edge.

Properties

end
Node end [@property getter]

Get the end of this edge. For undirected graphs this is the larger of both incident nodes.

start
Node start [@property getter]

Get the start of this edge. For undirected graphs this is the smaller of both incident nodes.

Meta