| 5 | use single_utilities::types::Direction; |
| 6 | |
| 7 | pub trait ComputeNonZero { |
| 8 | fn nonzero_whole<T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>> |
| 9 | where |
| 10 | T: PrimInt + Unsigned + Zero + AddAssign + Send + Sync; |
| 11 | |
| 12 | fn nonzero_chunk<T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()> |
| 13 | where |
| 14 | T: PrimInt + Unsigned + Zero + AddAssign + Send + Sync; |
| 15 | |
| 16 | fn nonzero_whole_masked<T>( |
| 17 | &self, |
| 18 | direction: &Direction, |
| 19 | mask: &[bool], |
| 20 | ) -> anyhow::Result<Vec<T>> |
| 21 | where |
| 22 | T: PrimInt + Unsigned + Zero + AddAssign + Send + Sync; |
| 23 | } |
| 24 | |
| 25 | pub trait ComputeSum { |
| 26 | fn sum_whole<T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>> |