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

Method values

src/matrix.rs:411–413  ·  view source on GitHub ↗

Returns an iterator over all elements of the matrix in row-major order. ``` # #[macro_use] extern crate rustml; use rustml::*; # fn main() { let m = mat![ 1.0, 1.5; 2.0, 2.5 ]; let mut i = m.values(); assert_eq!(i.next().unwrap(), &1.0); assert_eq!(i.next().unwrap(), &1.5); assert_eq!(i.next().unwrap(), &2.0); # } ```

(&self)

Source from the content-addressed store, hash-verified

409 /// # }
410 /// ```
411 pub fn values(&self) -> Iter<T> {
412 self.data.iter()
413 }
414
415 /// Returns a mutable iterator over all elements of the matrix in row-major order.
416 ///

Callers 5

similarMethod · 0.80
findMethod · 0.80
if_thenMethod · 0.80
mainFunction · 0.80
plot_nnFunction · 0.80

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected