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

Method row_iter

src/matrix.rs:456–458  ·  view source on GitHub ↗

Returns an iterator over the rows of the matrix. Each call to the `next` method is done in O(1). ``` # #[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(); assert_eq!(i.next().unwrap(), [1.0, 1.5]); assert_eq!(i.next().unwrap(), [2.0, 2.5]); assert_eq!(i.next().unwrap(), [5.0, 5.5]); # } ```

(&self)

Source from the content-addressed store, hash-verified

454 /// # }
455 /// ```
456 pub fn row_iter(&self) -> RowIterator<T> {
457 self.row_iter_at(0)
458 }
459
460 /// Returns an iterator over the rows of the matrix. The iterator
461 /// starts at the the row with index `n`.

Callers 12

insert_columnMethod · 0.80
columnMethod · 0.80
rm_columnMethod · 0.80
errorMethod · 0.80
derivativesMethod · 0.80
all_pair_distancesFunction · 0.80
add_columnsMethod · 0.80
add_matrixMethod · 0.80
matrix_to_csvFunction · 0.80
scanFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

row_iter_atMethod · 0.80

Tested by

no test coverage detected