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

Method variance_whole

src/backed/statistics/mod.rs:108–122  ·  view source on GitHub ↗
(&self, direction: &Direction)

Source from the content-addressed store, hash-verified

106
107impl<B: Backend> ComputeVariance for ArrayElem<B> {
108 fn variance_whole<I, T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>>
109 where
110 I: PrimInt + Unsigned + Zero + AddAssign + Into<T> + Send + Sync,
111 T: num_traits::Float + num_traits::NumCast + AddAssign + std::iter::Sum + Send + Sync,
112 {
113 let x_data = self.get::<ArrayData>()?.expect("X matrix not found!");
114 match direction {
115 Direction::COLUMN => {
116 match_array_data_apply_function_with_generics!(x_data, var_col, [I, T])
117 }
118 Direction::ROW => {
119 match_array_data_apply_function_with_generics!(x_data, var_row, [I, T])
120 }
121 }
122 }
123
124 fn variance_chunk<I, T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()>
125 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected