irlba_tatami
tatami wrappers for IRLBA
Loading...
Searching...
No Matches
irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ > Class Template Referencefinal

Wrap a tatami matrix for irlba. More...

#include <normal.hpp>

Inheritance diagram for irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >:
Collaboration diagram for irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >:

Public Member Functions

 Normal (TMatrixPointer_ mat, int num_threads)
 
Eigen::Index rows () const
 
Eigen::Index cols () const
 
std::unique_ptr< irlba::Workspace< EigenVector_ > > new_workspace () const
 
std::unique_ptr< irlba::AdjointWorkspace< EigenVector_ > > new_adjoint_workspace () const
 
std::unique_ptr< irlba::RealizeWorkspace< EigenMatrix_ > > new_realize_workspace () const
 
auto new_known_workspace () const
 
auto new_known_adjoint_workspace () const
 
auto new_known_realize_workspace () const
 
- Public Member Functions inherited from irlba::Matrix< EigenVector_, EigenMatrix_ >
std::unique_ptr< Workspace< EigenVector_ > > new_known_workspace () const
 
std::unique_ptr< AdjointWorkspace< EigenVector_ > > new_known_adjoint_workspace () const
 
std::unique_ptr< RealizeWorkspace< EigenMatrix_ > > new_known_realize_workspace () const
 

Detailed Description

template<class EigenVector_, class EigenMatrix_, typename TValue_, typename TIndex_, class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
class irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >

Wrap a tatami matrix for irlba.

Template Parameters
EigenVector_A floating-point Eigen::Vector.
EigenMatrix_A floating-point Eigen::Matrix.
TValue_Numeric type of the tatami matrix value.
TIndex_Integer type of the tatami matrix row/column indices.
TMatrixPointer_Pointer to a tatami matrix class consistent with TValue_ and TIndex_. This may be a raw or smart pointer.

This class computes the matrix-vector product for a tatami::Matrix or one of its subclasses. The aim is to avoid realizing a tatami::Matrix into an Eigen::Matrix or irlba::ParallelSparseMatrix for use in irlba::compute(). Iteration over a tatami::Matrix is generally slower, as this effectively trades speed for memory efficiency.

Constructor & Destructor Documentation

◆ Normal()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::Normal ( TMatrixPointer_ mat,
int num_threads )
inline
Parameters
matPointer to an instance of a tatami matrix. The lifetime of mat should exceed that of the Normal instance constructed from it.
num_threadsNumber of threads for the various operations.

Member Function Documentation

◆ cols()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
Eigen::Index irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::cols ( ) const
inlinevirtual

◆ new_adjoint_workspace()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
std::unique_ptr< irlba::AdjointWorkspace< EigenVector_ > > irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::new_adjoint_workspace ( ) const
inlinevirtual

◆ new_known_adjoint_workspace()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
auto irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::new_known_adjoint_workspace ( ) const
inline

Overrides irlba::Matrix::new_adjoint_workspace() to enable devirtualization.

◆ new_known_realize_workspace()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
auto irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::new_known_realize_workspace ( ) const
inline

Overrides irlba::Matrix::new_realize_workspace() to enable devirtualization.

◆ new_known_workspace()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
auto irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::new_known_workspace ( ) const
inline

Overrides irlba::Matrix::new_workspace() to enable devirtualization.

◆ new_realize_workspace()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
std::unique_ptr< irlba::RealizeWorkspace< EigenMatrix_ > > irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::new_realize_workspace ( ) const
inlinevirtual

◆ new_workspace()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
std::unique_ptr< irlba::Workspace< EigenVector_ > > irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::new_workspace ( ) const
inlinevirtual

◆ rows()

template<class EigenVector_ , class EigenMatrix_ , typename TValue_ , typename TIndex_ , class TMatrixPointer_ = std::shared_ptr<const tatami::Matrix<TValue_, TIndex_> >>
Eigen::Index irlba_tatami::Normal< EigenVector_, EigenMatrix_, TValue_, TIndex_, TMatrixPointer_ >::rows ( ) const
inlinevirtual

The documentation for this class was generated from the following file: