petgraph::visit

Trait VisitMap

Source
pub trait VisitMap<N> {
    // Required methods
    fn visit(&mut self, a: N) -> bool;
    fn is_visited(&self, a: &N) -> bool;
}
Expand description

A mapping for storing the visited status for NodeId N.

Required Methods§

Source

fn visit(&mut self, a: N) -> bool

Mark a as visited.

Return true if this is the first visit, false otherwise.

Source

fn is_visited(&self, a: &N) -> bool

Return whether a has been visited before.

Implementations on Foreign Types§

Source§

impl<Ix> VisitMap<Ix> for FixedBitSet
where Ix: IndexType,

Source§

fn visit(&mut self, x: Ix) -> bool

Source§

fn is_visited(&self, x: &Ix) -> bool

Source§

impl<N, S> VisitMap<N> for HashSet<N, S>
where N: Hash + Eq, S: BuildHasher,

Source§

fn visit(&mut self, x: N) -> bool

Source§

fn is_visited(&self, x: &N) -> bool

Implementors§