tatami
C++ API for different matrix representations
|
Take the sign of a matrix entry. More...
#include <math_helpers.hpp>
Take the sign of a matrix entry.
This class takes the sign of each element of a Matrix
, returning -1, 0 or 1 for negative, zero or positive values, respectively. It should be used as the Operation_
in the DelayedUnaryIsometricOperation
class. It may be used regardless of whether InputValue_
and OutputValue_
are equal (or not).
This operation will report NaNs in the input as NaNs in the output if supported by the OutputValue_
type, otherwise they are set to 0.
InputValue_ | Type of the matrix value to use in the operation. |