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

Delayed vector comparisons. More...

#include <substitute_helpers.hpp>

Public Member Functions

 DelayedUnaryIsometricSubstituteVector (Vector_ compared, Vector_ substitute, bool by_row)
 

Detailed Description

template<CompareOperation op_, typename Value_, typename Vector_>
class tatami::DelayedUnaryIsometricSubstituteVector< op_, Value_, Vector_ >

Delayed vector comparisons.

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

Template Parameters
op_The comparison operation.
InputValue_Type of the matrix value.
Vector_Type of the vector.

Constructor & Destructor Documentation

◆ DelayedUnaryIsometricSubstituteVector()

tatami::DelayedUnaryIsometricSubstituteVector< op_, Value_, Vector_ >::DelayedUnaryIsometricSubstituteVector ( Vector_  compared,
Vector_  substitute,
bool  by_row 
)
inline
Parameters
comparedVector to use in the comparison with the matrix values. This should be of length equal to the number of rows if by_row = true, otherwise it should be of length equal to the number of columns. The matrix value from each row/column is assumed to be on the left hand side of the comparison, while the corresponding value of compared is on the right.
substituteVector containing values to be substituted into the matrix at every element where the comparison to the corresponding element of compared is true. This should be of length equal to the number of rows if by_row = true, otherwise it should be of length equal to the number of columns.
by_rowWhether compared and substitute corresponds to the rows. If true, each element of the vectors is assumed to correspond to a row, and that element is used as an operand with all entries in the same row of the matrix. If false, each element of the vectors is assumed to correspond to a column instead.

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