Trait traitgraph::walks::EdgeWalk [−][src]
pub trait EdgeWalk<'a, Graph: GraphBase, EdgeSubwalk: EdgeWalk<'a, Graph, EdgeSubwalk> + ?Sized>: Sequence<'a, Graph::EdgeIndex, EdgeSubwalk> where
Graph::EdgeIndex: 'a, {
fn compute_trivial_heart(&'a self, graph: &Graph) -> Option<(usize, usize)>
where
Graph: StaticGraph,
{ ... }
fn compute_trivial_heart_edge_len(&'a self, graph: &Graph) -> Option<usize>
where
Graph: StaticGraph,
{ ... }
fn is_non_trivial(&'a self, graph: &Graph) -> bool
where
Graph: StaticGraph,
{ ... }
fn compute_univocal_extension<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> ResultWalk
where
Graph: StaticGraph,
{ ... }
fn compute_univocal_extension_non_scc<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> ResultWalk
where
Graph: StaticGraph,
{ ... }
fn compute_univocal_extension_with_original_offset<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> (usize, ResultWalk)
where
Graph: StaticGraph,
{ ... }
fn compute_univocal_extension_with_original_offset_non_scc<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> (usize, ResultWalk)
where
Graph: StaticGraph,
{ ... }
fn clone_as_node_walk<ResultWalk: From<Vec<Graph::NodeIndex>>>(
&'a self,
graph: &Graph
) -> Option<ResultWalk>
where
Graph: StaticGraph,
{ ... }
fn is_proper_subwalk_of(&'a self, other: &Self) -> bool
where
Graph::EdgeIndex: Eq,
{ ... }
fn is_circular_walk(&'a self, graph: &Graph) -> bool
where
Graph: StaticGraph,
{ ... }
}
Expand description
A sequence of edges in a graph, where each consecutive pair of edges is connected by a node.
Provided methods
fn compute_trivial_heart(&'a self, graph: &Graph) -> Option<(usize, usize)> where
Graph: StaticGraph,
fn compute_trivial_heart(&'a self, graph: &Graph) -> Option<(usize, usize)> where
Graph: StaticGraph,
Computes the trivial heart of the walk, or returns None
if the walk is non-trivial.
The heart is returned as the index of the last split arc and the index of the first join arc of the walk.
fn compute_trivial_heart_edge_len(&'a self, graph: &Graph) -> Option<usize> where
Graph: StaticGraph,
fn compute_trivial_heart_edge_len(&'a self, graph: &Graph) -> Option<usize> where
Graph: StaticGraph,
Compute the amount of edges in the trivial heart, or returns None
if the walk is non-trivial.
Recall that a heart is a walk from arc to arc.
fn is_non_trivial(&'a self, graph: &Graph) -> bool where
Graph: StaticGraph,
fn is_non_trivial(&'a self, graph: &Graph) -> bool where
Graph: StaticGraph,
Returns true if this walk is non-trivial.
fn compute_univocal_extension<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> ResultWalk where
Graph: StaticGraph,
fn compute_univocal_extension<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> ResultWalk where
Graph: StaticGraph,
Compute the univocal extension of a walk. That is the concatenation LWR, where W is the walk, L the longest R-univocal walk to the first edge of W and R the longest univocal walk from the last edge of W.
fn compute_univocal_extension_non_scc<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> ResultWalk where
Graph: StaticGraph,
fn compute_univocal_extension_non_scc<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> ResultWalk where
Graph: StaticGraph,
Compute the univocal extension of a walk. That is the concatenation LWR, where W is the walk, L the longest R-univocal walk to the first edge of W and R the longest univocal walk from the last edge of W. This variant handles not strongly connected graphs by forbidding L and R to repeat edges.
fn compute_univocal_extension_with_original_offset<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> (usize, ResultWalk) where
Graph: StaticGraph,
fn compute_univocal_extension_with_original_offset<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> (usize, ResultWalk) where
Graph: StaticGraph,
Compute the univocal extension of a walk. That is the concatenation LWR, where W is the walk, L the longest R-univocal walk to the first edge of W and R the longest univocal walk from the last edge of W.
Additionally to the univocal extension, this function returns the offset of the original walk in the univocal extension as usize.
fn compute_univocal_extension_with_original_offset_non_scc<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> (usize, ResultWalk) where
Graph: StaticGraph,
fn compute_univocal_extension_with_original_offset_non_scc<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
&'a self,
graph: &Graph
) -> (usize, ResultWalk) where
Graph: StaticGraph,
Compute the univocal extension of a walk. That is the concatenation LWR, where W is the walk, L the longest R-univocal walk to the first edge of W and R the longest univocal walk from the last edge of W. This variant handles not strongly connected graphs by forbidding L and R to repeat edges.
Additionally to the univocal extension, this function returns the offset of the original walk in the univocal extension as usize.
fn clone_as_node_walk<ResultWalk: From<Vec<Graph::NodeIndex>>>(
&'a self,
graph: &Graph
) -> Option<ResultWalk> where
Graph: StaticGraph,
fn clone_as_node_walk<ResultWalk: From<Vec<Graph::NodeIndex>>>(
&'a self,
graph: &Graph
) -> Option<ResultWalk> where
Graph: StaticGraph,
Returns the node walk represented by this edge walk. If this walk contains no edge, then None is returned. If there is a consecutive pair of edges not connected by a node, then this method panics.
Returns true if this is a proper subwalk of the given walk. Proper means that the walks are not equal.
fn is_circular_walk(&'a self, graph: &Graph) -> bool where
Graph: StaticGraph,
fn is_circular_walk(&'a self, graph: &Graph) -> bool where
Graph: StaticGraph,
Returns true if this is a valid circular walk in the given graph.