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
orJ
depending on whetherF
returntrue
orfalse
. IfF
return true, next item will come fromI
. IfF
return false, next item will come fromJ
. If either ofI
orJ
is exhausted, it will consider this iterator exhausted. - Linear
CorIter - Linear correlation by number of item based on primary and secondary iterator.
It take two co-efficient
a
andb
of any subtype ofInt
.
Enums§
- Either
- An enum that represent either primary’s value or secondary value.
Traits§
- Correlate
- Add correlate functionalities to any sized
T
that implementIntoIterator
. The correlate mean that two iterators yield items based on some predefined rule(s).