tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tatami::DelayedUnaryIsometricSubstituteScalar< op_, Value_ > Class Template Reference

Delayed scalar substitution. More...

#include <substitute_helpers.hpp>

Public Member Functions

 DelayedUnaryIsometricSubstituteScalar (Value_ compared, Value_ substitute)
 

Detailed Description

template<CompareOperation op_, typename Value_>
class tatami::DelayedUnaryIsometricSubstituteScalar< op_, Value_ >

Delayed scalar substitution.

This class compares each element of a Matrix to a scalar; when this comparison is true, it replaces the matrix element with another scalar value. It should be used as the Operation_ in the DelayedUnaryIsometricOperation class, and only when InputValue_ == OutputValue_.

Template Parameters
op_The comparison operation.
Value_Type of the matrix value.

Constructor & Destructor Documentation

◆ DelayedUnaryIsometricSubstituteScalar()

template<CompareOperation op_, typename Value_ >
tatami::DelayedUnaryIsometricSubstituteScalar< op_, Value_ >::DelayedUnaryIsometricSubstituteScalar ( Value_  compared,
Value_  substitute 
)
inline
Parameters
comparedScalar to be compared to the matrix values. The matrix value is assumed to be on the left hand side of the comparison, while compared is on the right.
substituteScalar to substitute into the matrix for every element where the comparison to compared is true.

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