irlba
A C++ library for IRLBA
|
Wrapper for a centered matrix. More...
#include <wrappers.hpp>
Public Member Functions | |
Centered (const Matrix_ &matrix, const EigenVector_ ¢er) | |
Wrapper for a centered matrix.
Matrix_ | Class satisfying the MockMatrix interface, or a floating-point Eigen::Matrix . |
EigenVector_ | A floating-point Eigen::Vector class for the column centers and matrix-vector product. |
This class computes the matrix-vector product after centering all columns in Matrix_
, i.e., subtracting the mean of each column from the values of that column. Naively doing such an operation would involve loss of sparsity, which we avoid by deferring the subtraction into the subspace defined by rhs
.
This class satisfies the MockMatrix
interface and implements all of its methods/typedefs.
|
inline |
matrix | Matrix to be column-centered. |
center | Vector of length equal to the number of columns of matrix , containing the value to subtract from each column. |