5 #ifndef __pinocchio_math_triangular_matrix_hpp__
6 #define __pinocchio_math_triangular_matrix_hpp__
8 #include "pinocchio/macros.hpp"
10 #include <Eigen/Dense>
20 typename Scalar =
typename RhsMatrix::Scalar,
21 bool is_vector_at_compile_time = RhsMatrix::IsVectorAtCompileTime>
22 struct TriangularMatrixMatrixProduct
24 template<
typename LhsMatrix,
typename ResMat>
26 const Eigen::MatrixBase<LhsMatrix> & lhs_mat,
27 const Eigen::MatrixBase<RhsMatrix> & rhs_vec,
28 const Eigen::MatrixBase<ResMat> & res)
30 res.const_cast_derived().col(0).noalias() =
31 lhs_mat.derived().template triangularView<info>() * rhs_vec.derived();
35 template<Eigen::UpLoType info,
typename RhsMatrix,
typename Scalar>
36 struct TriangularMatrixMatrixProduct<info, RhsMatrix, Scalar, false>
38 template<
typename LhsMatrix,
typename ResMat>
40 const Eigen::MatrixBase<LhsMatrix> & lhs_mat,
41 const Eigen::MatrixBase<RhsMatrix> & rhs_mat,
42 const Eigen::MatrixBase<ResMat> & res)
44 res.const_cast_derived().noalias() =
45 lhs_mat.derived().template triangularView<info>() * rhs_mat.derived();
58 template<Eigen::UpLoType info,
typename LhsMatrix,
typename RhsMatrix,
typename ResMat>
60 const Eigen::MatrixBase<LhsMatrix> & lhs_mat,
61 const Eigen::MatrixBase<RhsMatrix> & rhs_mat,
62 const Eigen::MatrixBase<ResMat> & res)
64 internal::TriangularMatrixMatrixProduct<info, RhsMatrix>::run(
65 lhs_mat.derived(), rhs_mat.derived(), res.const_cast_derived());
Main pinocchio namespace.
void triangularMatrixMatrixProduct(const Eigen::MatrixBase< LhsMatrix > &lhs_mat, const Eigen::MatrixBase< RhsMatrix > &rhs_mat, const Eigen::MatrixBase< ResMat > &res)
Evaluate the product of a triangular matrix times a matrix. Eigen showing a bug at this level,...