include
pinocchio
autodiff
casadi
math
autodiff/casadi/math/matrix.hpp
Go to the documentation of this file.
1
//
2
// Copyright (c) 2019-2020 INRIA
3
//
4
5
#ifndef __pinocchio_autodiff_casadi_math_matrix_hpp__
6
#define __pinocchio_autodiff_casadi_math_matrix_hpp__
7
8
#include "
pinocchio/math/matrix.hpp
"
9
10
namespace
pinocchio
11
{
12
namespace
internal
13
{
14
template
<
typename
Scalar>
15
struct
CallCorrectMatrixInverseAccordingToScalar
<::casadi::Matrix<Scalar>>
16
{
17
typedef ::casadi::Matrix<Scalar>
SX
;
18
template
<
typename
MatrixIn,
typename
MatrixOut>
19
static
void
20
run
(
const
Eigen::MatrixBase<MatrixIn> & mat,
const
Eigen::MatrixBase<MatrixOut> & dest)
21
{
22
SX
cs_mat(
mat
.rows(),
mat
.cols());
23
casadi::copy
(
mat
.derived(), cs_mat);
24
25
SX
cs_mat_inv = SX::inv(cs_mat);
26
27
MatrixOut & dest_ =
PINOCCHIO_EIGEN_CONST_CAST
(MatrixOut, dest);
28
casadi::copy
(cs_mat_inv, dest_);
29
}
30
};
31
}
// namespace internal
32
}
// namespace pinocchio
33
34
#endif // ifndef __pinocchio_autodiff_casadi_math_matrix_hpp__
PINOCCHIO_EIGEN_CONST_CAST
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
Definition:
eigen-macros.hpp:51
pinocchio::internal::CallCorrectMatrixInverseAccordingToScalar<::casadi::Matrix< Scalar > >::run
static void run(const Eigen::MatrixBase< MatrixIn > &mat, const Eigen::MatrixBase< MatrixOut > &dest)
Definition:
autodiff/casadi/math/matrix.hpp:20
pinocchio::internal::CallCorrectMatrixInverseAccordingToScalar
Definition:
math/matrix.hpp:258
matrix.hpp
mat
mat
pinocchio::internal::CallCorrectMatrixInverseAccordingToScalar<::casadi::Matrix< Scalar > >::SX
::casadi::Matrix< Scalar > SX
Definition:
autodiff/casadi/math/matrix.hpp:17
pinocchio.casadi::copy
void copy(::casadi::Matrix< Scalar > const &src, Eigen::MatrixBase< MT > &dst)
Definition:
autodiff/casadi.hpp:154
pinocchio
Main pinocchio namespace.
Definition:
timings.cpp:27
pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:47