irlba
A C++ library for IRLBA
|
Interface for a matrix to use in compute()
.
More...
#include <MockMatrix.hpp>
Classes | |
struct | AdjointWorkspace |
Workspace class for adjoint_multiply() . More... | |
struct | Workspace |
Workspace class for multiply() . More... | |
Public Member Functions | |
Eigen::Index | rows () const |
Eigen::Index | cols () const |
Workspace | workspace () const |
AdjointWorkspace | adjoint_workspace () const |
template<class Right_ , class EigenVector_ > | |
void | multiply (const Right_ &rhs, Workspace &work, EigenVector_ &out) const |
template<class Right_ , class EigenVector_ > | |
void | adjoint_multiply (const Right_ &rhs, AdjointWorkspace &work, EigenVector_ &out) const |
template<class EigenMatrix_ > | |
EigenMatrix_ | realize () const |
Interface for a matrix to use in compute()
.
Defines a compile-time interface for a matrix input to IRLBA. This should mainly provide methods for multiplication with a vector. Developers can also define wrappers to perform the matrix-vector multiplication after some operation like centering or scaling. The idea is to compute the product without actually modifying the underlying matrix, which is important when the modification results in an unnecessary copy and/or loss of sparsity. We achieve this by deferring the modification into the subspace defined by vector.
|
inline |
Right_ | A floating-point Eigen::Vector or equivalent expression. |
EigenVector_ | A floating-point Eigen::Vector . |
[in] | rhs | The right-hand side of the matrix product. |
work | The return value of adjoint_workspace() . This can be reused across multiple adjoint_multiply() calls. | |
[out] | out | The output vector to store the matrix product. This is filled with the product of the transpose of this matrix and rhs . |
This method will be called without any explicit template arguments, so implementations do not need to use the same number/order of template parameters. EigenVector_
may also be a template parameter of the class rather than the method. depending on what is most convenient for defining the associated AdjointWorkspace
.
|
inline |
adjoint_multiply()
.
|
inline |
|
inline |
Right_ | A floating-point Eigen::Vector or equivalent expression. |
EigenVector_ | A floating-point Eigen::Vector . |
[in] | rhs | The right-hand side of the matrix product. |
work | The return value of workspace() . This can be reused across multiple multiply() calls. | |
[out] | out | The output vector to store the matrix product. This is filled with the product of this matrix and rhs . |
This method will be called without any explicit template arguments, so implementations do not need to use the same number/order of template parameters. EigenVector_
may also be a template parameter of the class rather than the method, depending on what is most convenient for defining the associated Workspace
.
|
inline |
EigenMatrix_ | A floating-point Eigen::Matrix . |
|
inline |
|
inline |
multiply()
.