MCPcopy Create free account
hub / github.com/Axect/Peroxide / swap

Method swap

src/complex/matrix.rs:2261–2266  ·  view source on GitHub ↗
(&mut self, idx1: usize, idx2: usize, shape: Shape)

Source from the content-addressed store, hash-verified

2259 }
2260
2261 unsafe fn swap(&mut self, idx1: usize, idx2: usize, shape: Shape) {
2262 match shape {
2263 Shape::Col => swap_vec_ptr(&mut self.col_mut(idx1), &mut self.col_mut(idx2)),
2264 Shape::Row => swap_vec_ptr(&mut self.row_mut(idx1), &mut self.row_mut(idx2)),
2265 }
2266 }
2267
2268 unsafe fn swap_with_perm(&mut self, p: &[(usize, usize)], shape: Shape) {
2269 for (i, j) in p.iter() {

Callers 4

invMethod · 0.45
solve_matMethod · 0.45
swap_with_permMethod · 0.45
swap_with_permMethod · 0.45

Calls 3

swap_vec_ptrFunction · 0.85
col_mutMethod · 0.45
row_mutMethod · 0.45

Tested by

no test coverage detected