Trait ArrayStatistics

Source
pub trait ArrayStatistics {
    // Required methods
    fn is_constant(&self) -> bool;
    fn as_constant(&self) -> Option<Scalar>;
}
Expand description

Extension functions for arrays that provide statistics.

Required Methods§

Source

fn is_constant(&self) -> bool

Make a best effort attempt to try and figure out if the array is constant, without canonicalizing it.

Source

fn as_constant(&self) -> Option<Scalar>

If Self::is_constant is true, return the actual constant value as a Scalar.

Implementors§

Source§

impl<A: Array + 'static> ArrayStatistics for A