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

Method find

src/matrix.rs:699–706  ·  view source on GitHub ↗

TODO tests

(&self, f: F)

Source from the content-addressed store, hash-verified

697
698 // TODO tests
699 pub fn find<F>(&self, f: F) -> Vec<(usize, usize)>
700 where F: Fn(&T) -> bool {
701
702 self.values().enumerate()
703 .filter(|&(_idx, val)| f(val))
704 .map(|(idx, _val)| (idx % self.cols(), idx / self.cols()))
705 .collect()
706 }
707
708 /// Inserts a column before the specified column (indexing starts at zero).
709 ///

Callers 1

from_csv_stringFunction · 0.80

Calls 3

mapMethod · 0.80
valuesMethod · 0.80
colsMethod · 0.80

Tested by

no test coverage detected