Trait afarray::ArrayInstanceReduce [−][src]
pub trait ArrayInstanceReduce<T>: ArrayInstance where
T: HasAfEnum,
T::AggregateOutType: DType,
T::ProductOutType: DType, {
type Product: HasAfEnum;
type Sum: HasAfEnum;
fn product(&self) -> T::ProductOutType;
fn sum(&self) -> T::AggregateOutType;
fn product_dtype() -> NumberType { ... }
fn sum_dtype() -> NumberType { ... }
}
Expand description
Defines common reduction operations product
and sum
.
Associated Types
Required methods
fn product(&self) -> T::ProductOutType
fn product(&self) -> T::ProductOutType
Calculate the cumulative product.
fn sum(&self) -> T::AggregateOutType
fn sum(&self) -> T::AggregateOutType
Calculate the cumulative sum.
Provided methods
fn product_dtype() -> NumberType
fn product_dtype() -> NumberType
The NumberType
of the product of this array.
fn sum_dtype() -> NumberType
fn sum_dtype() -> NumberType
The NumberType
of the sum of this array.