Drake
Drake C++ Documentation
eigen_sparse_triplet.h File Reference
#include <vector>
#include <Eigen/SparseCore>
Include dependency graph for eigen_sparse_triplet.h:

Namespaces

 drake
 
 drake::math
 

Functions

template<typename Scalar , int Options, typename StorageIndex >
std::vector< Eigen::Triplet< Scalar > > SparseMatrixToTriplets (const Eigen::SparseMatrix< Scalar, Options, StorageIndex > &matrix)
 For a sparse matrix, return a vector of triplets, such that we can reconstruct the matrix using setFromTriplet function. More...
 
template<typename Derived >
void SparseMatrixToRowColumnValueVectors (const Derived &matrix, std::vector< Eigen::Index > &row_indices, std::vector< Eigen::Index > &col_indices, std::vector< typename Derived::Scalar > &val)
 For a sparse matrix, return the row indices, the column indices, and value of the non-zero entries. More...