MCPcopy Index your code
hub / github.com/SingleRust/SingleRust / n_top_whole

Method n_top_whole

src/memory/statistics/mod.rs:264–278  ·  view source on GitHub ↗
(&self, direction: &Direction, n: usize)

Source from the content-addressed store, hash-verified

262
263impl ComputeNTop for IMArrayElement {
264 fn n_top_whole<T>(&self, direction: &Direction, n: usize) -> anyhow::Result<Vec<T>>
265 where
266 T: num_traits::Float + num_traits::NumCast + Copy + PartialOrd + NumericOps + Send + Sync,
267 {
268 let read_guard = self.0.read_inner();
269 let data = read_guard.deref();
270 match direction {
271 Direction::COLUMN => {
272 match_array_data_apply_function!(data, sum_row_n_top, n)
273 }
274 Direction::ROW => {
275 match_array_data_apply_function!(data, sum_row_n_top, n)
276 }
277 }
278 }
279}
280
281impl ComputeTopSegmentProportions for IMArrayElement {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected