SparseMatrix.h File Reference

Definitions of useful sparse matrix functions. More...

`#include <Eigen/Sparse>`
`#include "SurgSim/Framework/Assert.h"`
`#include "SurgSim/Math/Matrix.h"`

Go to the source code of this file.

## Classes

class | SurgSim::Math::Operation< DerivedSub, SparseType, StorageOrder >
| Helper class to run operation a column/row of a matrix to a chunk of memory where the size is dynamically defined. More...
class | SurgSim::Math::Operation< DerivedSub, SparseType, Eigen::ColMajor >
| Specialization for column major storage. More...
class | SurgSim::Math::Operation< DerivedSub, SparseType, Eigen::RowMajor >
| Specialization for row major storage. More...

## Namespaces

| SurgSim
| SurgSim::Math

## Typedefs

typedef Eigen::SparseMatrix< double > | SurgSim::Math::SparseMatrix
| A sparse matrix. More...

## Functions

template<int Opt, typename Index >
void | SurgSim::Math::blockWithSearch (const Eigen::Ref< const Matrix > &subMatrix, size_t rowStart, size_t columnStart, size_t n, size_t m, Eigen::SparseMatrix< double, Opt, Index > *matrix, void(Operation< Matrix, Eigen::SparseMatrix< double, Opt, Index >>::*op)(double *, size_t, size_t, size_t, const Matrix &, size_t))
| Runs a given operation on a SparseMatrix block(i, j, n, m) from a (n x m) 'subMatrix' with searching for the block 1st element. More...
template<int Opt, typename Index >
void | SurgSim::Math::blockOperation (const Eigen::Ref< const Matrix > &subMatrix, size_t rowStart, size_t columnStart, Eigen::SparseMatrix< double, Opt, Index > *matrix, void(Operation< Matrix, Eigen::SparseMatrix< double, Opt, Index >>::*op)(double *, const double &))
| Runs a given operation on a SparseMatrix block(i, j, n, m) from a (n x m) 'subMatrix' with searching for the block 1st element. More...
template<int Opt, typename Index >
void | SurgSim::Math::addSubMatrix (const Eigen::Ref< const Matrix > &subMatrix, size_t blockIdRow, size_t blockIdCol, Eigen::SparseMatrix< double, Opt, Index > *matrix, bool initialize=true)
| Helper method to add a sub-matrix into a matrix, for the sake of clarity. More...
template<int Opt, typename Index >
void | SurgSim::Math::assignSubMatrix (const Eigen::Ref< const Matrix > &subMatrix, size_t blockIdRow, size_t blockIdCol, Eigen::SparseMatrix< double, Opt, Index > *matrix, bool initialize=true)
| Helper method to assign a sub-matrix into a matrix, for the sake of clarity. More...
template<typename T , int Opt, typename Index >
void | SurgSim::Math::zeroRow (size_t row, Eigen::SparseMatrix< T, Opt, Index > *matrix)
| Helper method to zero a row of a matrix specialized for Sparse Matrices. More...
template<typename T , int Opt, typename Index >
void | SurgSim::Math::zeroColumn (size_t column, Eigen::SparseMatrix< T, Opt, Index > *matrix)
| Helper method to zero a column of a matrix specialized for Sparse Matrices. More...
template<typename T , int Opt, typename Index >
void | SurgSim::Math::clearMatrix (Eigen::SparseMatrix< T, Opt, Index > *matrix)
| Helper method to zero all entries of a matrix specialized for Sparse Matrices. More...

## Detailed Description

Definitions of useful sparse matrix functions.