| 23 | } |
| 24 | |
| 25 | pub trait ComputeSum { |
| 26 | fn sum_whole<T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>> |
| 27 | where |
| 28 | T: Float + num_traits::NumCast + AddAssign + std::iter::Sum + Send + Sync; |
| 29 | |
| 30 | fn sum_chunk<T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()> |
| 31 | where |
| 32 | T: Float + num_traits::NumCast + AddAssign + std::iter::Sum + Send + Sync; |
| 33 | |
| 34 | fn sum_whole_masked<T>(&self, direction: &Direction, mask: &[bool]) -> anyhow::Result<Vec<T>> |
| 35 | where |
| 36 | T: Float + num_traits::NumCast + AddAssign + std::iter::Sum + Send + Sync; |
| 37 | } |
| 38 | |
| 39 | pub trait ComputeVariance { |
| 40 | fn variance_whole<I, T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>> |