MCPcopy Create free account
hub / github.com/daniel-e/rustml / row_iter_at

Method row_iter_at

src/matrix.rs:478–484  ·  view source on GitHub ↗

Returns an iterator over the rows of the matrix. The iterator starts at the the row with index `n`. ``` # #[macro_use] extern crate rustml; use rustml::*; # fn main() { let m = mat![ 1.0, 1.5; 2.0, 2.5; 5.0, 5.5 ]; let mut i = m.row_iter_at(1); assert_eq!(i.next().unwrap(), [2.0, 2.5]); assert_eq!(i.next().unwrap(), [5.0, 5.5]); # } ```

(&self, n: usize)

Source from the content-addressed store, hash-verified

476 /// # }
477 /// ```
478 pub fn row_iter_at(&self, n: usize) -> RowIterator<T> {
479
480 RowIterator {
481 m: self,
482 idx: n
483 }
484 }
485
486 /*
487 pub fn row_iter_at_mut(&mut self, n: usize) -> RowIterMut<T> {

Callers 2

row_iterMethod · 0.80
all_pair_distancesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected