Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::ColumnIndexedMatrix< MatrixType > Class Template Reference

View over a matrix that exposes a (possibly reordered) subset of its columns. More...

#include <online_householder_qr.h>

Public Types

using VectorType = Eigen::Matrix<typename MatrixType::Scalar, Eigen::Dynamic, 1>

Public Member Functions

 ColumnIndexedMatrix (Eigen::Ref< MatrixType > mat)
 ColumnIndexedMatrix (Eigen::Ref< MatrixType > mat, momentum::span< const Eigen::Index > colIndices)
auto col (Eigen::Index colIdx)
auto rows () const
auto cols () const
momentum::span< const Eigen::Index > columnIndices () const
VectorType transpose_times (Eigen::Ref< VectorType > b) const
 Computes this->transpose() * b, returning a vector of length cols().

Detailed Description

template<typename MatrixType>
class momentum::ColumnIndexedMatrix< MatrixType >

View over a matrix that exposes a (possibly reordered) subset of its columns.

When constructed with a colIndices span, accessing column i of this view returns the underlying matrix's column colIndices[i]. This lets callers run QR on a column subset without copying the matrix. When constructed without indices, this is a thin pass-through to the wrapped Eigen reference.

Note
Holds an Eigen::Ref and a non-owning span — the underlying matrix and index buffer must outlive this view. The view is mutable: mutations through col() write back into the wrapped matrix.

Definition at line 38 of file online_householder_qr.h.

Member Typedef Documentation

◆ VectorType

template<typename MatrixType>
using momentum::ColumnIndexedMatrix< MatrixType >::VectorType = Eigen::Matrix<typename MatrixType::Scalar, Eigen::Dynamic, 1>

Definition at line 40 of file online_householder_qr.h.

Constructor & Destructor Documentation

◆ ColumnIndexedMatrix() [1/2]

template<typename MatrixType>
momentum::ColumnIndexedMatrix< MatrixType >::ColumnIndexedMatrix ( Eigen::Ref< MatrixType > mat)
inlineexplicit

Definition at line 42 of file online_householder_qr.h.

◆ ColumnIndexedMatrix() [2/2]

template<typename MatrixType>
momentum::ColumnIndexedMatrix< MatrixType >::ColumnIndexedMatrix ( Eigen::Ref< MatrixType > mat,
momentum::span< const Eigen::Index > colIndices )
inlineexplicit

Definition at line 44 of file online_householder_qr.h.

References momentum::validateColumnIndices().

Member Function Documentation

◆ col()

◆ cols()

◆ columnIndices()

template<typename MatrixType>
momentum::span< const Eigen::Index > momentum::ColumnIndexedMatrix< MatrixType >::columnIndices ( ) const
inlinenodiscard

Definition at line 71 of file online_householder_qr.h.

◆ rows()

◆ transpose_times()

template<typename MatrixType>
VectorType momentum::ColumnIndexedMatrix< MatrixType >::transpose_times ( Eigen::Ref< VectorType > b) const
inlinenodiscard

Computes this->transpose() * b, returning a vector of length cols().

Parameters
bVector with rows() entries.
Returns
Vector with cols() entries; entry i equals view.col(i).dot(b).

Definition at line 78 of file online_householder_qr.h.


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