Trait rs_graph::vec::Indexer[][src]

pub trait Indexer: Clone {
    type Idx;
    type Iter: GraphIterator<Self, Item = Self::Idx>;
    fn num_items(&self) -> usize;
fn index(&self, i: Self::Idx) -> usize;
fn iter(&self) -> GraphIter<'_, Self, Self::Iter>

Notable traits for GraphIter<'a, G, I>

impl<'a, G, I> Iterator for GraphIter<'a, G, I> where
    I: GraphIterator<G>, 
type Item = I::Item;

    where
        Self: Sized
; }

A indexer maps items to numeric indices.

Associated Types

type Idx[src]

The type of the index items.

type Iter: GraphIterator<Self, Item = Self::Idx>[src]

Loading content...

Required methods

fn num_items(&self) -> usize[src]

Return the number of items.

This is the maximal allowed index.

fn index(&self, i: Self::Idx) -> usize[src]

Return the index associated with an item.

fn iter(&self) -> GraphIter<'_, Self, Self::Iter>

Notable traits for GraphIter<'a, G, I>

impl<'a, G, I> Iterator for GraphIter<'a, G, I> where
    I: GraphIterator<G>, 
type Item = I::Item;
where
    Self: Sized
[src]

Return an iterator over all items.

Loading content...

Implementors

impl<'a, G> Indexer for EdgeIndexer<'a, G> where
    G: IndexGraphRef<'a> + Clone
[src]

type Idx = G::Edge

type Iter = IndexerIt<G::EdgeIt>

impl<'a, G> Indexer for NodeIndexer<'a, G> where
    G: IndexGraphRef<'a> + Clone
[src]

type Idx = G::Node

type Iter = IndexerIt<G::NodeIt>

Loading content...