Skip to content

strata::Scalar

Part of Element-wise expressions.

template <typename T>
struct strata::Scalar;

A value used as an operand, as in view * 2 or lengths * Speed{3.0}.

It has no shape of its own: the shape of the expression is used, and the value is the same at every position. The operators wrap plain numbers and other copyable values in a Scalar for you.

Template parameters

Name Description
T The type of the value.

Members

cursor

constexpr detail::ScalarCursor<T> cursor() const

A cursor that reads the value wherever it is moved.