SortedIterator

Trait SortedIterator 

Source
pub unsafe trait SortedIterator: Iterator { }
Expand description

Marker trait for Iterators yielding labels in the order induced by enumerating the successors in ascending order.

The AssumeSortedIterator type can be used to wrap an iterator and unsafely implement this trait.

§Safety

The labels returned by the iterator must be in the order in which they would be if successors were returned in ascending order.

§Examples

To bind the iterators returned by the lender returned by SequentialLabeling::iter to implement this trait, you must use higher-rank trait bounds:

use webgraph::traits::*;

fn takes_labeling_with_sorted_iterators<G>(g: G) where
    G: SequentialLabeling,
    for<'a, 'b> LenderIntoIter<'b, G::Lender<'a>>: SortedIterator,
{
    // ...
}

Implementations on Foreign Types§

Source§

impl<I: SortedIterator, J: SortedIterator> SortedIterator for Zip<I, J>

Implementors§

Source§

impl<D: Decode> SortedIterator for webgraph::graphs::bvgraph::random_access::Succ<D>

Source§

impl<E: Endianness, D: BitDeserializer<E, BitReader<E>>, const OUTDEGREE_CODE: usize, const SRC_CODE: usize, const DST_CODE: usize> SortedIterator for GroupedGapsIterator<E, D, OUTDEGREE_CODE, SRC_CODE, DST_CODE>
where BitReader<E>: BitRead<E> + CodesRead<E>, BitWriter<E>: BitWrite<E> + CodesWrite<E>,

Source§

impl<E: Endianness, D: BitDeserializer<E, BitReader<E>>, const SRC_CODE: usize, const DST_CODE: usize> SortedIterator for GapsIterator<E, D, SRC_CODE, DST_CODE>
where BitReader<E>: BitRead<E> + CodesRead<E>, BitWriter<E>: BitWrite<E> + CodesWrite<E>,

Source§

impl<I: Iterator> SortedIterator for AssumeSortedIterator<I>

Source§

impl<I: Iterator<Item = usize> + SortedIterator> SortedIterator for webgraph::graphs::no_selfloops_graph::Succ<I>

Source§

impl<I: Iterator<Item = usize> + SortedIterator, J: Iterator<Item = usize> + SortedIterator> SortedIterator for webgraph::graphs::union_graph::Succ<I, J>

Source§

impl<I: SortedIterator> SortedIterator for LeftIntoIter<I>
where I::Item: Pair,

Source§

impl<I: SortedIterator> SortedIterator for RightIntoIter<I>
where I::Item: Pair,

Source§

impl<L, I: IntoIterator<Item = ((usize, usize), L)>> SortedIterator for webgraph::graphs::arc_list_graph::Succ<'_, L, I>

Source§

impl<T, I: Iterator<Item = ((usize, usize), T)> + SortedIterator> SortedIterator for KMergeIters<I, T>