tatami
C++ API for different matrix representations
|
Delayed unary isometric vector arithmetic. More...
#include <arithmetic_helpers.hpp>
Public Member Functions | |
DelayedUnaryIsometricArithmeticVector (Vector_ vector, bool by_row) | |
Delayed unary isometric vector arithmetic.
This class applies the specified arithmetic operation to each element of a Matrix
where the other operand is row/column-specific value. 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).
op_ | The arithmetic operation. |
right_ | Whether the vector's values should be on the right hand side of the arithmetic operation. Ignored for some op_ . |
InputValue_ | Type of the matrix value to use in the operation. |
Vector_ | Type of the vector. |
|
inline |
vector | Vector of values to use in the operation. 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_row | Whether vector corresponds to the rows. If true, each element of the vector 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 vector is assumed to correspond to a column instead. |