7#include "detail/utils.hpp"
49 []() -> std::array<Eigen::SparseMatrix<
Scalar<G>>, Dof<G>> {
50 std::array<Eigen::SparseMatrix<Scalar<G>>, Dof<G>> ret;
51 for (
auto i = 0u; i < Dof<G>; ++i) {
53 ret[i].makeCompressed();
63 Eigen::SparseMatrix<Scalar<G>> ret(Dof<G>, Dof<G>);
64 if constexpr (!IsCommutative<G>) {
65 for (
const auto & gen : generators_sparse<G>) { ret += gen; }
68 ret.coeffs().setZero();
90 Eigen::SparseMatrix<Scalar<G>> ret(Dof<G>, Dof<G>);
91 if constexpr (IsCommutative<G>) {
93 for (
auto i = 0u; i < Dof<G>; ++i) { ret.insert(i, i) =
Scalar<G>(1); }
99 for (
auto i = 0u; i < Dof<G>; ++i) {
100 for (
auto j = 0u; j < Dof<G>; ++j) { ret.insert(i, j) = (i == j) ?
Scalar<G>(1) :
Scalar<G>(0); }
103 ret.makeCompressed();
121template<LieGroup G,
bool Inv = false>
145 Eigen::SparseMatrix<Scalar<G>> ret(Dof<G>, Dof<G> * Dof<G>);
146 if constexpr (IsCommutative<G>) {
153 ret = Eigen::Matrix<Scalar<G>, Dof<G>, Dof<G> * Dof<G>>::Ones().sparseView();
155 ret.makeCompressed();
173template<LieGroup G,
bool Inv = false>
194#include "detail/lie_group_sparse_impl.hpp"
Meta header to include all LieGroup concept model specifications.
void dr_exp_sparse(Eigen::SparseMatrix< Scalar< G > > &sp, const Tangent< G > &a, Eigen::Index i0=0)
Sparse dr_exp.
Eigen::SparseMatrix< Scalar< G > > d_exp_sparse_pattern
Sparsity pattern of dr_exp_sparse, dr_expinv_sparse (inline variable).
void d2r_expinv_sparse(Eigen::SparseMatrix< Scalar< G > > &sp, const Tangent< G > &a, Eigen::Index i0=0)
Sparse d2r_expinv.
void ad_sparse(Eigen::SparseMatrix< Scalar< G > > &sp, const Tangent< G > &a)
Sparse ad.
void dr_expinv_sparse(Eigen::SparseMatrix< Scalar< G > > &sp, const Tangent< G > &a, Eigen::Index i0=0)
Sparse dr_expinv.
std::array< Eigen::SparseMatrix< Scalar< G > >, Dof< G > > generators_sparse
Generators of lie algebra (inline variable).
Eigen::SparseMatrix< Scalar< G > > ad_sparse_pattern
Sparsity pattern of ad_sparse (inline variable).
void d2r_exp_sparse(Eigen::SparseMatrix< Scalar< G > > &sp, const Tangent< G > &a, Eigen::Index i0=0)
Sparse d2r_exp.
Eigen::SparseMatrix< Scalar< G > > d2_exp_sparse_pattern
Sparsity pattern of d2r_exp_sparse(), d2r_expinv_sparse() (inline variable).
Eigen::Vector< Scalar< M >, Dof< M > > Tangent
Tangent as a Dof-length vector.
typename traits::man< M >::Scalar Scalar
Manifold scalar type.
Traits that defines sparsity patterns for various groups.