tatami_mult
Multiply tatami matrices
|
Multiplication of tatami matrices. More...
Classes | |
struct | Options |
Options for multiply() . More... | |
Functions | |
template<typename Value_ , typename Index_ , typename Right_ , typename Output_ > | |
void | multiply (const tatami::Matrix< Value_, Index_ > &left, const Right_ *right, Output_ *output, const Options &opt) |
template<typename Left_ , typename Value_ , typename Index_ , typename Output_ > | |
void | multiply (const Left_ *left, const tatami::Matrix< Value_, Index_ > &right, Output_ *output, const Options &opt) |
template<typename Value_ , typename Index_ , typename Right_ , typename Output_ > | |
void | multiply (const tatami::Matrix< Value_, Index_ > &left, const std::vector< Right_ * > &right, const std::vector< Output_ * > &output, const Options &opt) |
template<typename Left_ , typename Value_ , typename Index_ , typename Output_ > | |
void | multiply (const std::vector< Left_ * > &left, const tatami::Matrix< Value_, Index_ > &right, const std::vector< Output_ * > &output, const Options &opt) |
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ > | |
void | multiply (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *output, const Options &opt) |
Multiplication of tatami matrices.
void tatami_mult::multiply | ( | const Left_ * | left, |
const tatami::Matrix< Value_, Index_ > & | right, | ||
Output_ * | output, | ||
const Options & | opt | ||
) |
Compute the product t(left) * right
, storing the result in output
.
Left_ | Numeric type of the vector on the left hand side. |
Value_ | Numeric type of the matrix value. |
Index_ | Integer type of the matrix index. |
Output_ | Numeric type of the output array. |
[in] | left | Pointer to an array of length right.nrow() , containing the vector with which to multiply right . |
right | A tatami matrix to be multiplied. | |
[out] | output | Pointer to an array of length right.ncol() . On output, this stores the product t(left) * right . |
opt | Further options. |
void tatami_mult::multiply | ( | const std::vector< Left_ * > & | left, |
const tatami::Matrix< Value_, Index_ > & | right, | ||
const std::vector< Output_ * > & | output, | ||
const Options & | opt | ||
) |
Compute the product t(left[i]) * right
for each array i
, storing the result in output[i]
.
Left_ | Numeric type of the vector on the left hand side. |
Value_ | Numeric type of the matrix value. |
Index_ | Integer type of the matrix index. |
Output_ | Numeric type of the output array. |
[in] | left | Vector of pointers, each of which points to an array of length right.nrow() . Each entry contains a vector with which to multiply right . |
right | A tatami matrix to be multiplied. | |
[out] | output | Vector of pointers, each of which points to an array of length right.ncol() . On output, the i -th entry stores the product t(left[i]) * right . |
opt | Further options. |
void tatami_mult::multiply | ( | const tatami::Matrix< LeftValue_, LeftIndex_ > & | left, |
const tatami::Matrix< RightValue_, RightIndex_ > & | right, | ||
Output_ * | output, | ||
const Options & | opt | ||
) |
Compute the product left * right
, storing the result in output
.
RightValue_ | Numeric type of the right matrix value. |
RightIndex_ | Integer type of the right matrix index. |
LeftValue_ | Numeric type of the left matrix value. |
LeftIndex_ | Integer type of the left matrix index. |
Output_ | Numeric type of the output array. |
left | A tatami matrix to use in the multiplication. | |
right | A tatami matrix to use in the multiplication. right.nrow() and left.ncol() should be equal. | |
[out] | output | Pointer to an array of length equal to left.nrow() * right.ncol() . On output, this stores the matrix product as a column- or row-major matrix (see Options::column_major_output ). |
opt | Further options. |
void tatami_mult::multiply | ( | const tatami::Matrix< Value_, Index_ > & | left, |
const Right_ * | right, | ||
Output_ * | output, | ||
const Options & | opt | ||
) |
Compute the product left * right
, storing the result in output
.
Value_ | Numeric type of the matrix value. |
Index_ | Integer type of the matrix index. |
Right_ | Numeric type of the vector on the right hand side. |
Output_ | Numeric type of the output array. |
left | A tatami matrix to be multiplied. | |
[in] | right | Pointer to an array of length left.ncol() , containing the vector with which to multiply left . |
[out] | output | Pointer to an array of length left.nrow() . On output, this stores the product left * right . |
opt | Further options. |
void tatami_mult::multiply | ( | const tatami::Matrix< Value_, Index_ > & | left, |
const std::vector< Right_ * > & | right, | ||
const std::vector< Output_ * > & | output, | ||
const Options & | opt | ||
) |
Compute the product left * right[i]
for each array i
, storing the result in output[i]
.
Value_ | Numeric type of the matrix value. |
Index_ | Integer type of the matrix index. |
Right_ | Numeric type of the vectors on the right hand side. |
Output_ | Numeric type of the output array. |
left | A tatami matrix to be multiplied. | |
[in] | right | Vector of pointers, each of which points to an array of length left.ncol() . Each entry contains a vector with which to multiply left . |
[out] | output | Vector of pointers, each of which points to an array of length left.nrow() . On output, the i -th entry stores the product left * right[i] . |
opt | Further options. |