MCPcopy Create free account
hub / github.com/SingleRust/SingleRust / sum_whole

Method sum_whole

src/memory/statistics/mod.rs:86–103  ·  view source on GitHub ↗
(&self, direction: &Direction)

Source from the content-addressed store, hash-verified

84
85impl ComputeSum for IMArrayElement {
86 fn sum_whole<T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>>
87 where
88 T: num_traits::Float
89 + num_traits::NumCast
90 + std::ops::AddAssign
91 + std::iter::Sum
92 + Send
93 + Sync,
94 {
95 let read_guard = self.0.read_inner();
96 let data = read_guard.deref();
97 match direction {
98 Direction::COLUMN => {
99 match_array_data_apply_function!(data, sum_col)
100 }
101 Direction::ROW => match_array_data_apply_function!(data, sum_row),
102 }
103 }
104
105 fn sum_chunk<T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()>
106 where

Callers 6

describe_obsFunction · 0.45
describe_varFunction · 0.45
normalize_with_typeFunction · 0.45
compute_seurat_hvgFunction · 0.45
compute_svr_hvgFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected