7 #ifndef _SPARSE_JACOBIAN_H
8 #define _SPARSE_JACOBIAN_H
12 #include <Ravelin/MatrixNd.h>
23 unsigned st_col_idx, st_row_idx;
24 unsigned rows()
const {
return block.rows(); }
25 unsigned columns()
const {
return block.columns(); }
26 Ravelin::MatrixNd block;
34 Ravelin::VectorNd& mult(
const Ravelin::VectorNd& x, Ravelin::VectorNd& result)
const;
35 Ravelin::MatrixNd& mult(
const Ravelin::MatrixNd& x, Ravelin::MatrixNd& result)
const;
36 Ravelin::MatrixNd&
transpose_mult(
const Ravelin::MatrixNd& x, Ravelin::MatrixNd& result)
const;
37 Ravelin::MatrixNd& mult(
const std::vector<MatrixBlock>& M,
unsigned result_cols, Ravelin::MatrixNd& result)
const;
38 Ravelin::MatrixNd& mult(
const std::vector<Ravelin::MatrixNd>& M, Ravelin::MatrixNd& result)
const;
40 Ravelin::MatrixNd&
to_dense(Ravelin::MatrixNd& M)
const;
43 std::vector<MatrixBlock> blocks;
A Sparse Jacobian representation along with multiplication routines.
Definition: SparseJacobian.h:30
Ravelin::MatrixNd & transpose_mult(const Ravelin::MatrixNd &x, Ravelin::MatrixNd &result) const
Multiplies the transpose of this sparse Jacobian by a matrix.
Definition: SparseJacobian.cpp:83
Matrix block.
Definition: SparseJacobian.h:21
Ravelin::MatrixNd & to_dense(Ravelin::MatrixNd &M) const
Converts a sparse Jacobian to a dense matrix (for debugging purposes)
Definition: SparseJacobian.cpp:305
Ravelin::MatrixNd & mult_transpose(const SparseJacobian &M, Ravelin::MatrixNd &result) const
Multiples this sparse Jacobian by the transpose of another sparse Jacobian.
Definition: SparseJacobian.cpp:120