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

Method variance_whole

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

Source from the content-addressed store, hash-verified

142
143impl ComputeVariance for IMArrayElement {
144 fn variance_whole<I, T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>>
145 where
146 I: num_traits::PrimInt
147 + num_traits::Unsigned
148 + num_traits::Zero
149 + std::ops::AddAssign
150 + Into<T>
151 + Send
152 + Sync,
153 T: num_traits::Float
154 + num_traits::NumCast
155 + std::ops::AddAssign
156 + std::iter::Sum
157 + Send
158 + Sync,
159 {
160 let read_guard = self.0.read_inner();
161
162 let data = read_guard.deref();
163
164 match direction {
165 Direction::COLUMN => {
166 match_array_data_apply_function_with_generics!(data, var_col, [I, T])
167 }
168 Direction::ROW => {
169 match_array_data_apply_function_with_generics!(data, var_row, [I, T])
170 }
171 }
172 }
173
174 fn variance_chunk<I, T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()>
175 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected