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

Method min_max_chunk

src/backed/statistics/mod.rs:169–199  ·  view source on GitHub ↗
(
        &self,
        direction: &Direction,
        reference: (&mut Vec<T>, &mut Vec<T>),
    )

Source from the content-addressed store, hash-verified

167 }
168
169 fn min_max_chunk<T>(
170 &self,
171 direction: &Direction,
172 reference: (&mut Vec<T>, &mut Vec<T>),
173 ) -> anyhow::Result<()>
174 where
175 T: num_traits::NumCast + Copy + PartialOrd + NumericOps + Send + Sync,
176 {
177 // Destructure the reference tuple into min and max vectors
178 let (min_ref, max_ref) = reference;
179
180 match direction {
181 Direction::COLUMN => {
182 // For columns, we need the full vectors since any chunk can affect any column
183 for (chunk, _start, _end) in self.iter::<ArrayData>(1000) {
184 match_array_data_apply_function!(chunk, min_max_col_chunk, (min_ref, max_ref))?;
185 }
186 }
187 Direction::ROW => {
188 // For rows, only process the slices corresponding to rows in this chunk
189 for (chunk, start, end) in self.iter::<ArrayData>(1000) {
190 match_array_data_apply_function!(
191 chunk,
192 min_max_col_chunk,
193 (&mut min_ref[start..end], &mut max_ref[start..end])
194 )?;
195 }
196 }
197 }
198 Ok(())
199 }
200}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected