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

Method variance_chunk

src/backed/statistics/mod.rs:124–152  ·  view source on GitHub ↗
(&self, direction: &Direction, reference: &mut [T])

Source from the content-addressed store, hash-verified

122 }
123
124 fn variance_chunk<I, T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()>
125 where
126 I: PrimInt + Unsigned + Zero + AddAssign + Into<T> + Send + Sync,
127 T: num_traits::Float + num_traits::NumCast + AddAssign + std::iter::Sum + Send + Sync,
128 {
129 match direction {
130 Direction::COLUMN => {
131 for (chunk, _start, _end) in self.iter::<ArrayData>(1000) {
132 match_array_data_apply_function_with_generics!(
133 chunk,
134 var_col_chunk,
135 [I, T],
136 reference
137 )?;
138 }
139 }
140 Direction::ROW => {
141 for (chunk, start, end) in self.iter::<ArrayData>(1000) {
142 match_array_data_apply_function_with_generics!(
143 chunk,
144 var_row_chunk,
145 [I, T],
146 &mut reference[start..end]
147 )?;
148 }
149 }
150 }
151 Ok(())
152 }
153}
154
155impl<B: Backend> ComputeMinMax for ArrayElem<B> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected