tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
List of all members
tatami::DelayedUnaryIsometricSign< InputValue_ > Class Template Reference

Take the sign of a matrix entry. More...

#include <math_helpers.hpp>

Detailed Description

template<typename InputValue_ = double>
class tatami::DelayedUnaryIsometricSign< InputValue_ >

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.

Template Parameters
InputValue_Type of the matrix value to use in the operation.

The documentation for this class was generated from the following file: