MCPcopy Create free account
hub / github.com/PerroEngine/Perro / max_cell

Method max_cell

perro_source/core/perro_structs/src/structs/matrix/mod.rs:809–816  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

807
808 #[inline]
809 pub fn max_cell(&self) -> Option<(usize, usize, T)>
810 where
811 T: Copy + PartialOrd,
812 {
813 self.cells()
814 .filter_map(|(row, col, value)| value.partial_cmp(value).map(|_| (row, col, *value)))
815 .max_by(|(_, _, a), (_, _, b)| a.partial_cmp(b).unwrap_or(std::cmp::Ordering::Equal))
816 }
817
818 #[inline]
819 pub fn map_cells<U>(self, mut f: impl FnMut(usize, usize, T) -> U) -> Matrix<ROWS, COLS, U>

Callers

nothing calls this directly

Calls 1

cellsMethod · 0.80

Tested by

no test coverage detected