Eigen::CSCMatrix Struct Reference

Helper class to convert Eigen::Matrix to csc struct expected by OSQP. More...

#include <eigen-osqp/CSCMatrix.h>

Public Member Functions

 CSCMatrix ()
 Default constructor. Allocate memory for an empty matrix. More...
 
void updateTriangularDefault (const MatrixConstRef &mat)
 Update current csc matrix to a new one. Only the upper triangular part is considered. More...
 
void updateDefault (const MatrixConstRef &mat)
 Update current csc matrix to a new one. More...
 
void updateAndAddIdentity (const MatrixConstRef &mat)
 Update current csc matrix to a new one and add an identity matrix beneath it. More...
 
void updateTriangularDefault (const MatrixCompressSparseConstRef &mat)
 Update current csc matrix to a new one. Only the upper triangular part is considered. More...
 
void updateDefault (const MatrixCompressSparseConstRef &mat)
 Update current csc matrix to a new one. More...
 
void updateAndAddIdentity (const MatrixCompressSparseConstRef &mat)
 Update current csc matrix to a new one and add an identity matrix beneath it. More...
 
csc * matrix () noexcept
 Get the csc matrix pointer. More...
 
MatrixDense toDenseEigen () const
 Convert csc matrix to Eigen dense matrix. More...
 
MatrixSparse toSparseEigen () const
 Convert csc matrix to Eigen sparse matrix. More...
 

Detailed Description

Helper class to convert Eigen::Matrix to csc struct expected by OSQP.

Constructor & Destructor Documentation

◆ CSCMatrix()

Eigen::CSCMatrix::CSCMatrix ( )

Default constructor. Allocate memory for an empty matrix.

Member Function Documentation

◆ matrix()

csc* Eigen::CSCMatrix::matrix ( )
inlinenoexcept

Get the csc matrix pointer.

Referenced by Eigen::OSQP::solve().

◆ toDenseEigen()

MatrixDense Eigen::CSCMatrix::toDenseEigen ( ) const

Convert csc matrix to Eigen dense matrix.

◆ toSparseEigen()

MatrixSparse Eigen::CSCMatrix::toSparseEigen ( ) const

Convert csc matrix to Eigen sparse matrix.

◆ updateAndAddIdentity() [1/2]

void Eigen::CSCMatrix::updateAndAddIdentity ( const MatrixConstRef mat)

Update current csc matrix to a new one and add an identity matrix beneath it.

Parameters
matDense matrix to convert.

Referenced by Eigen::OSQP::solve().

◆ updateAndAddIdentity() [2/2]

void Eigen::CSCMatrix::updateAndAddIdentity ( const MatrixCompressSparseConstRef mat)

Update current csc matrix to a new one and add an identity matrix beneath it.

Parameters
matCompress sparse matrix to convert.

◆ updateDefault() [1/2]

void Eigen::CSCMatrix::updateDefault ( const MatrixConstRef mat)

Update current csc matrix to a new one.

Parameters
matDense matrix to convert.

Referenced by Eigen::OSQP::solve().

◆ updateDefault() [2/2]

void Eigen::CSCMatrix::updateDefault ( const MatrixCompressSparseConstRef mat)

Update current csc matrix to a new one.

Parameters
matCompress sparse matrix to convert.

◆ updateTriangularDefault() [1/2]

void Eigen::CSCMatrix::updateTriangularDefault ( const MatrixConstRef mat)

Update current csc matrix to a new one. Only the upper triangular part is considered.

Note
It is up to the user to check that the matrix is symmetrical.
Parameters
matDense matrix to convert.

Referenced by Eigen::OSQP::solve().

◆ updateTriangularDefault() [2/2]

void Eigen::CSCMatrix::updateTriangularDefault ( const MatrixCompressSparseConstRef mat)

Update current csc matrix to a new one. Only the upper triangular part is considered.

Note
It is up to the user to check that the matrix is symmetrical.
Parameters
matDense matrix to convert.