#include <initializer_list>
#include <Eigen/SparseCore>
#include <gch/small_vector.hpp>
Go to the source code of this file.
|
| template<typename Scalar> |
| void | append_as_triplets (gch::small_vector< Eigen::Triplet< Scalar > > &triplets, int row_offset, int col_offset, std::initializer_list< Eigen::SparseMatrix< Scalar > > mats) |
| | Appends sparse matrices to list of triplets at the given offset.
|
| template<typename Scalar> |
| void | append_diagonal_as_triplets (gch::small_vector< Eigen::Triplet< Scalar > > &triplets, int row_offset, int col_offset, const Eigen::Vector< Scalar, Eigen::Dynamic > &diag) |
| | Append diagonal matrix to list of triplets at the given offset.
|
◆ append_as_triplets()
template<typename Scalar>
| void append_as_triplets |
( |
gch::small_vector< Eigen::Triplet< Scalar > > & | triplets, |
|
|
int | row_offset, |
|
|
int | col_offset, |
|
|
std::initializer_list< Eigen::SparseMatrix< Scalar > > | mats ) |
Appends sparse matrices to list of triplets at the given offset.
The triplets are appended in column-major order (e.g., first column of mat1, first column of mat2 underneath first column of mat1, second column of mat1, second column of mat2 underneath second column of mat1).
- Template Parameters
-
- Parameters
-
| triplets | List of triplets. |
| row_offset | Row offset for first matrix. |
| col_offset | Column offset for first matrix. |
| mats | Sparse matrices to append. |
◆ append_diagonal_as_triplets()
template<typename Scalar>
| void append_diagonal_as_triplets |
( |
gch::small_vector< Eigen::Triplet< Scalar > > & | triplets, |
|
|
int | row_offset, |
|
|
int | col_offset, |
|
|
const Eigen::Vector< Scalar, Eigen::Dynamic > & | diag ) |
Append diagonal matrix to list of triplets at the given offset.
- Template Parameters
-
- Parameters
-
| triplets | List of triplets. |
| row_offset | Row offset for first matrix. |
| col_offset | Column offset for first matrix. |
| diag | Diagonal of matrix. |