Crate cor_iter

Source
Expand description

Correlate iterators, in this crate, mean that two iterators that iterate in harmony according to some pre-defined function.

It is different from zipping two iterators in that two zipped iterators always return pair of next item from both iterators at once.

The correlate iterators can have m items return from one iterator then it another n items return from another iterator where m != n.

It is possible to have m == n correlate iterators but it will be less efficient than simply zip it together.

Structs§

CorIter
An iterator that keep return next item either in I or J depending on whether F return true or false. If F return true, next item will come from I. If F return false, next item will come from J. If either of I or J is exhausted, it will consider this iterator exhausted.
LinearCorIter
Linear correlation by number of item based on primary and secondary iterator. It take two co-efficient a and b of any subtype of Int.

Enums§

Either
An enum that represent either primary’s value or secondary value.

Traits§

Correlate
Add correlate functionalities to any sized T that implement IntoIterator. The correlate mean that two iterators yield items based on some predefined rule(s).