Scalar represents a 0-dimensional tensor which contains a single element. More...
#include <Scalar.h>
Public Member Functions | |
template<typename T > | |
T | to () |
bool | isFloatingPoint () const |
bool | isIntegral () const |
bool | isComplex () const |
Scalar | operator- () const |
Scalar represents a 0-dimensional tensor which contains a single element.
Unlike a tensor, numeric literals (in C++) are implicitly convertible to Scalar (which is why, for example, we provide both add(Tensor) and add(Scalar) overloads for many operations). It may also be used in circumstances where you statically know a tensor is 0-dim and single size, but don't know it's type.