pub trait DirectedNeighborsWithValues<NI, EV> where
NI: Idx, {
fn out_neighbors_with_values(&self, node: NI) -> &[Target<NI, EV>];
fn in_neighbors_with_values(&self, node: NI) -> &[Target<NI, EV>];
}
Expand description
A graph where the order within an edge tuple is important.
An edge tuple e = (u, v)
has a source node u
and a target node v
. From
the perspective of u
, the edge e
is an outgoing edge. From the
perspective of node v
, the edge e
is an incoming edge. The edges
(u, v)
and (v, u)
are not considered equivalent.
Required methods
fn out_neighbors_with_values(&self, node: NI) -> &[Target<NI, EV>]
fn out_neighbors_with_values(&self, node: NI) -> &[Target<NI, EV>]
Returns a slice of all nodes which are connected in outgoing direction to the given node, i.e., the given node is the source node of the connecting edge.
fn in_neighbors_with_values(&self, node: NI) -> &[Target<NI, EV>]
fn in_neighbors_with_values(&self, node: NI) -> &[Target<NI, EV>]
Returns a slice of all nodes which are connected in incoming direction to the given node, i.e., the given node is the target node of the connecting edge.