pub trait WalkableGraph: GraphBase + Sized {
    // Provided methods
    fn create_node_walk<WalkType: NodeWalk<Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>(
        &self,
        walk: &[Self::NodeIndex]
    ) -> WalkType { ... }
    fn create_empty_node_walk<WalkType: NodeWalk<Self, SubwalkType> + Default, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>(
        &self
    ) -> WalkType { ... }
    fn create_edge_walk<WalkType: EdgeWalk<Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: EdgeWalk<Self, SubwalkType> + ?Sized>(
        &self,
        walk: &[Self::EdgeIndex]
    ) -> WalkType { ... }
    fn create_empty_edge_walk<WalkType: EdgeWalk<Self, SubwalkType> + Default, SubwalkType: EdgeWalk<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§

source

fn create_node_walk<WalkType: NodeWalk<Self, SubwalkType> + FromIterator<Self::NodeIndex>, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>( &self, walk: &[Self::NodeIndex] ) -> WalkType

Create a node-centric walk over the given nodes in this graph.

source

fn create_empty_node_walk<WalkType: NodeWalk<Self, SubwalkType> + Default, SubwalkType: NodeWalk<Self, SubwalkType> + ?Sized>( &self ) -> WalkType

Create an empty node-centric walk in this graph.

source

fn create_edge_walk<WalkType: EdgeWalk<Self, SubwalkType> + FromIterator<Self::EdgeIndex>, SubwalkType: EdgeWalk<Self, SubwalkType> + ?Sized>( &self, walk: &[Self::EdgeIndex] ) -> WalkType

Create an edge-centric walk over the given edges in this graph.

source

fn create_empty_edge_walk<WalkType: EdgeWalk<Self, SubwalkType> + Default, SubwalkType: EdgeWalk<Self, SubwalkType> + ?Sized>( &self ) -> WalkType

Create an empty edge-centric walk in this graph.

Implementors§

source§

impl<Graph: GraphBase> WalkableGraph for Graph