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

Method transposed

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

Source from the content-addressed store, hash-verified

1001
1002 #[inline]
1003 pub fn transposed(self) -> Matrix<COLS, ROWS, T>
1004 where
1005 T: Copy + Default,
1006 {
1007 let mut out = [[T::default(); ROWS]; COLS];
1008 for (r, row) in self.0.iter().enumerate() {
1009 for (c, value) in row.iter().enumerate() {
1010 out[c][r] = *value;
1011 }
1012 }
1013 Matrix(out)
1014 }
1015
1016 #[inline]
1017 pub fn transpose(&mut self) -> &mut Self

Callers 2

into_colsMethod · 0.80
mul_f32_transposedMethod · 0.80

Calls 3

MatrixClass · 0.85
transposeMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected