Trait SkipIterator

Source
pub trait SkipIterator {
    // Required methods
    fn next(&mut self) -> Option<(Tuple, Vec<usize>)>;
    fn skip(&mut self, min: Tuple);
    fn arity(&self) -> usize;
    fn len(&self) -> usize;
}
Expand description

A SkipIterator is like a normal iterator, but:

  • The arity of all returned Tuples must be identical, and equal to the value returned by arity()
  • It can be moved to the first value above or equal to a tuple, meaning the iterator must be rewindable.

Required Methods§

Source

fn next(&mut self) -> Option<(Tuple, Vec<usize>)>

Provides the next tuple in the iterator, the fact ID it was derived from

Source

fn skip(&mut self, min: Tuple)

Sets the iterator position to return the minimum value which is greater than or equal to the provided min.

Source

fn arity(&self) -> usize

Returns the arity of the tuples that will be returned by next()

Source

fn len(&self) -> usize

Returns the total length of the iterator, if it were fully rewound

Implementors§