mathru/algebra/linear/vector/
vectorintoiterator.rs

1use crate::algebra::{
2    abstr::{Field, Scalar},
3    linear::matrix::MatrixIntoIterator,
4};
5use std::iter::Iterator;
6
7pub struct VectorIntoIterator<T> {
8    iter: MatrixIntoIterator<T>,
9}
10
11impl<T> VectorIntoIterator<T> {
12    pub fn new(iter: MatrixIntoIterator<T>) -> VectorIntoIterator<T> {
13        VectorIntoIterator { iter }
14    }
15}
16
17impl<T> Iterator for VectorIntoIterator<T>
18where
19    T: Field + Scalar,
20{
21    type Item = T;
22
23    fn next(&mut self) -> Option<Self::Item> {
24        self.iter.next()
25    }
26}