Trait traitgraph::interface::WalkableGraph [−][src]
pub trait WalkableGraph: GraphBase + Sized {
fn create_node_walk<WalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::NodeIndex]
) -> WalkType { ... }
fn create_empty_node_walk<WalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + Default, SubwalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + ?Sized>(
&self
) -> WalkType { ... }
fn create_edge_walk<WalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::EdgeIndex]
) -> WalkType { ... }
fn create_empty_edge_walk<WalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + Default, SubwalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + ?Sized>(
&self
) -> WalkType { ... }
}
Expand description
A helper trait to get the correct walk type from a graph. This is the factory pattern, where a graph is a factory for walks.
Provided methods
fn create_node_walk<WalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::NodeIndex]
) -> WalkType
fn create_node_walk<WalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: for<'a> NodeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::NodeIndex]
) -> WalkType
Create a node-centric walk over the given nodes in this graph.
Create an empty node-centric walk in this graph.
fn create_edge_walk<WalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::EdgeIndex]
) -> WalkType
fn create_edge_walk<WalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: for<'a> EdgeWalk<'a, Self, SubwalkType> + ?Sized>(
&self,
walk: &[Self::EdgeIndex]
) -> WalkType
Create an edge-centric walk over the given edges in this graph.