Trait ndarray::Scalar
[−]
[src]
pub trait Scalar { }
Elements that can be used as direct operands in arithmetic with arrays.
This trait does not limit which elements can be stored in an ArrayBase
.
Scalar
simply determines which types are applicable for direct operator
overloading, e.g. B @ K
or B @= K
where B
is a mutable array,
K
a scalar, and @
arbitrary arithmetic operator that the scalar supports.
Left hand side operands must instead be implemented one by one (it does not
involve the Scalar
trait). Scalar left hand side operations: K @ &A
and K @ B
, are implemented for the primitive numerical types and for
Complex<f32>, Complex<f64>
.
Non-Scalar
types can still participate in arithmetic as array elements in
in array-array operations.