Some algorithms for Vector
| 1 | /// Some algorithms for Vector |
| 2 | pub trait Algorithm { |
| 3 | type Scalar; |
| 4 | |
| 5 | fn rank(&self) -> Vec<usize>; |
| 6 | fn sign(&self) -> Self::Scalar; |
| 7 | fn arg_max(&self) -> usize; |
| 8 | fn arg_min(&self) -> usize; |
| 9 | fn max(&self) -> Self::Scalar; |
| 10 | fn min(&self) -> Self::Scalar; |
| 11 | fn swap_with_perm(&mut self, p: &[(usize, usize)]); |
| 12 | } |