1#ifndef IRLBA_MOCK_MATRIX_HPP
2#define IRLBA_MOCK_MATRIX_HPP
27 MockMatrix(Eigen::MatrixXd x) : my_x(std::move(x)) {}
40 Eigen::Index
rows()
const {
return my_x.rows(); }
45 Eigen::Index
cols()
const {
return my_x.cols(); }
94 template<
class Right_,
class EigenVector_>
95 void multiply(
const Right_& rhs, [[maybe_unused]]
Workspace& work, EigenVector_& out)
const {
96 out.noalias() = my_x * rhs;
114 template<
class Right_,
class EigenVector_>
116 out.noalias() = my_x.adjoint() * rhs;
124 template<
class EigenMatrix_>
126 return EigenMatrix_(my_x);
Interface for a matrix to use in compute().
Definition MockMatrix.hpp:22
void adjoint_multiply(const Right_ &rhs, AdjointWorkspace &work, EigenVector_ &out) const
Definition MockMatrix.hpp:115
AdjointWorkspace adjoint_workspace() const
Definition MockMatrix.hpp:74
Eigen::Index cols() const
Definition MockMatrix.hpp:45
Eigen::Index rows() const
Definition MockMatrix.hpp:40
Workspace workspace() const
Definition MockMatrix.hpp:59
EigenMatrix_ realize() const
Definition MockMatrix.hpp:125
void multiply(const Right_ &rhs, Workspace &work, EigenVector_ &out) const
Definition MockMatrix.hpp:95
Implements IRLBA for approximate SVD.
Definition compute.hpp:18
Workspace class for adjoint_multiply().
Definition MockMatrix.hpp:69
Workspace class for multiply().
Definition MockMatrix.hpp:54