Skip to content

Commit

Permalink
toward expression template
Browse files Browse the repository at this point in the history
  • Loading branch information
artivis committed Aug 2, 2020
1 parent 2cbda42 commit 0dbd4ee
Show file tree
Hide file tree
Showing 56 changed files with 2,895 additions and 2,937 deletions.
19 changes: 18 additions & 1 deletion include/manif/Rn.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,32 @@
#define _MANIF_RN_H_

#include "manif/impl/macro.h"
#include "manif/constants.h"
#include "manif/impl/utils.h"
#include "manif/impl/lie_group_base.h"

#include "manif/impl/traits.h"
#include "manif/impl/core/crtp.h"

#include "manif/impl/eigen.h"

#include "manif/impl/expr/expr.h"
#include "manif/impl/random.h"
#include "manif/impl/generator.h"
#include "manif/impl/assignment_assert.h"

#include "lt/optional.hpp"

#include "manif/impl/tangent_base.h"
#include "manif/impl/lie_group_base.h"

#include "manif/impl/rn/Rn_properties.h"
#include "manif/impl/rn/Rn_base.h"
#include "manif/impl/rn/RnTangent_base.h"
#include "manif/impl/rn/Rn.h"
#include "manif/impl/rn/Rn_expr.h"
#include "manif/impl/rn/RnTangent.h"
#include "manif/impl/rn/RnTangent_expr.h"

#include "manif/impl/rn/Rn_map.h"
#include "manif/impl/rn/RnTangent_map.h"

Expand Down
21 changes: 19 additions & 2 deletions include/manif/SE2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,32 @@
#define _MANIF_SE2_H_

#include "manif/impl/macro.h"
#include "manif/impl/lie_group_base.h"
#include "manif/impl/tangent_base.h"
#include "manif/constants.h"
#include "manif/impl/utils.h"

#include "manif/impl/traits.h"
#include "manif/impl/core/crtp.h"

#include "manif/impl/eigen.h"

#include "manif/impl/expr/expr.h"
#include "manif/impl/random.h"
#include "manif/impl/generator.h"
#include "manif/impl/assignment_assert.h"

#include "lt/optional.hpp"

#include "manif/impl/tangent_base.h"
#include "manif/impl/lie_group_base.h"

#include "manif/impl/se2/SE2_properties.h"
#include "manif/impl/se2/SE2_base.h"
#include "manif/impl/se2/SE2Tangent_base.h"
#include "manif/impl/se2/SE2.h"
#include "manif/impl/se2/SE2_expr.h"
#include "manif/impl/se2/SE2Tangent.h"
#include "manif/impl/se2/SE2Tangent_expr.h"

#include "manif/impl/se2/SE2_map.h"
#include "manif/impl/se2/SE2Tangent_map.h"

Expand Down
27 changes: 24 additions & 3 deletions include/manif/SE3.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
#ifndef _MANIF_SE3_H_
#define _MANIF_SE3_H_

#include "manif/impl/macro.h"
#include "manif/impl/lie_group_base.h"
#include "manif/impl/tangent_base.h"
// #include "manif/impl/macro.h"
// #include "manif/constants.h"
// #include "manif/impl/utils.h"
//
// #include "manif/impl/traits.h"
// #include "manif/impl/core/crtp.h"
//
// #include "manif/impl/eigen.h"
//
// #include "manif/impl/expr/expr.h"
// #include "manif/impl/random.h"
// #include "manif/impl/generator.h"
// #include "manif/impl/assignment_assert.h"
//
// #include "lt/optional.hpp"
//
// #include "manif/impl/tangent_base.h"
// #include "manif/impl/lie_group_base.h"

#include "manif/SO3.h"

#include "manif/impl/se3/SE3_utils.h"
#include "manif/impl/se3/SE3_properties.h"
#include "manif/impl/se3/SE3_base.h"
#include "manif/impl/se3/SE3Tangent_base.h"
#include "manif/impl/se3/SE3.h"
#include "manif/impl/se3/SE3_expr.h"
#include "manif/impl/se3/SE3Tangent.h"
#include "manif/impl/se3/SE3Tangent_expr.h"

#include "manif/impl/se3/SE3_map.h"
#include "manif/impl/se3/SE3Tangent_map.h"

Expand Down
19 changes: 18 additions & 1 deletion include/manif/SO2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,32 @@
#define _MANIF_SO2_H_

#include "manif/impl/macro.h"
#include "manif/constants.h"
#include "manif/impl/utils.h"
#include "manif/impl/lie_group_base.h"

#include "manif/impl/traits.h"
#include "manif/impl/core/crtp.h"

#include "manif/impl/eigen.h"

#include "manif/impl/expr/expr.h"
#include "manif/impl/random.h"
#include "manif/impl/generator.h"
#include "manif/impl/assignment_assert.h"

#include "lt/optional.hpp"

#include "manif/impl/tangent_base.h"
#include "manif/impl/lie_group_base.h"

#include "manif/impl/so2/SO2_properties.h"
#include "manif/impl/so2/SO2_base.h"
#include "manif/impl/so2/SO2Tangent_base.h"
#include "manif/impl/so2/SO2.h"
#include "manif/impl/so2/SO2_expr.h"
#include "manif/impl/so2/SO2Tangent.h"
#include "manif/impl/so2/SO2Tangent_expr.h"

#include "manif/impl/so2/SO2_map.h"
#include "manif/impl/so2/SO2Tangent_map.h"

Expand Down
20 changes: 19 additions & 1 deletion include/manif/SO3.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,32 @@
#define _MANIF_SO3_H_

#include "manif/impl/macro.h"
#include "manif/impl/lie_group_base.h"
#include "manif/constants.h"
#include "manif/impl/utils.h"

#include "manif/impl/traits.h"
#include "manif/impl/core/crtp.h"

#include "manif/impl/eigen.h"

#include "manif/impl/expr/expr.h"
#include "manif/impl/random.h"
#include "manif/impl/generator.h"
#include "manif/impl/assignment_assert.h"

#include "lt/optional.hpp"

#include "manif/impl/tangent_base.h"
#include "manif/impl/lie_group_base.h"

#include "manif/impl/so3/SO3_properties.h"
#include "manif/impl/so3/SO3_base.h"
#include "manif/impl/so3/SO3Tangent_base.h"
#include "manif/impl/so3/SO3.h"
#include "manif/impl/so3/SO3_expr.h"
#include "manif/impl/so3/SO3Tangent.h"
#include "manif/impl/so3/SO3Tangent_expr.h"

#include "manif/impl/so3/SO3_map.h"
#include "manif/impl/so3/SO3Tangent_map.h"

Expand Down
10 changes: 10 additions & 0 deletions include/manif/impl/expr/act.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ struct ActExpr
mutable RhsOptJacobianRef J_ret_rhs_;
};

namespace internal {

template <template <typename _Derived> class _LieGroupBase,
typename _Derived, typename _DerivedOther>
struct ReturnTypeHelper<ActExpr<_LieGroupBase<_Derived>, _DerivedOther>>
{
using type = typename traits<_Derived>::Vector;
};

} // namespace internal
} // namespace manif

#endif // _MANIF_MANIF_IMPL_EXPR_ACT_H_
21 changes: 1 addition & 20 deletions include/manif/impl/lie_group_base.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
#ifndef _MANIF_MANIF_LIE_GROUP_BASE_H_
#define _MANIF_MANIF_LIE_GROUP_BASE_H_

#include "manif/impl/core/crtp.h"

#include "manif/impl/macro.h"
#include "manif/impl/traits.h"
#include "manif/impl/eigen.h"
#include "manif/impl/tangent_base.h"
#include "manif/impl/assignment_assert.h"

#include "manif/impl/expr/expr.h"

#include "manif/constants.h"

#include "lt/optional.hpp"

namespace manif {

/**
Expand All @@ -25,11 +11,6 @@ namespace manif {
template <class _Derived>
struct LieGroupBase : internal::crtp<_Derived>
{
private:

// _Derived& derived() { return *static_cast< _Derived* >(this); }
// const _Derived& derived() const { return *static_cast< const _Derived* >(this); }

public:

static constexpr int Dim = internal::traits<_Derived>::Dim;
Expand Down Expand Up @@ -368,7 +349,7 @@ struct LieGroupBase : internal::crtp<_Derived>
//! Static helper to create a random object of the Lie group.
static LieGroup Random();

protected:
// protected:

inline _Derived& derived() & noexcept { return *static_cast< _Derived* >(this); }
inline const _Derived& derived() const & noexcept { return *static_cast< const _Derived* >(this); }
Expand Down
Loading

0 comments on commit 0dbd4ee

Please sign in to comment.