From 7b86e5d51f5f0f6d6458c3b95ec1372287eaa30b Mon Sep 17 00:00:00 2001 From: ManifoldFR Date: Thu, 23 Oct 2025 18:13:06 +0200 Subject: [PATCH 1/2] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7b6f7a4d0..95082f790 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ Please also consider citing the reference paper for the ProxDDP algorithm: * [Antoine Bussy](https://github.com/antoine-bussy) (Aldebaran) * [Valentin Tordjman--Levavasseur](https://github.com/Tordjx) (Inria): feature developer * [Louise Manson](https://github.com/LouiseMsn) (Inria): documentation +* [Yann de Mont-Marin](https://github.com/ymontmarin) (Inria): Lie group formalism and associated features ## Acknowledgments From 210d46a8d5263c70b48855c210c0b02ff0c06ba7 Mon Sep 17 00:00:00 2001 From: ManifoldFR Date: Fri, 24 Oct 2025 17:20:45 +0200 Subject: [PATCH 2/2] basic stump files for new Lie group/algebra types --- include/aligator/core/lie-algebra.hpp | 16 +++++++++++ include/aligator/core/lie-group-base.hpp | 35 ++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 include/aligator/core/lie-algebra.hpp create mode 100644 include/aligator/core/lie-group-base.hpp diff --git a/include/aligator/core/lie-algebra.hpp b/include/aligator/core/lie-algebra.hpp new file mode 100644 index 000000000..a6a4b0480 --- /dev/null +++ b/include/aligator/core/lie-algebra.hpp @@ -0,0 +1,16 @@ +/// @file +/// @copyright Copyright (C) 2025 INRIA +#pragma once + +#include "aligator/fwd.hpp" + +namespace aligator { + +template struct LieAlgebraTraits; + +/// @brief Base CRTP for Lie algebras. +template struct LieAlgebraBase { + using Traits = LieAlgebraTraits; +}; + +} // namespace aligator diff --git a/include/aligator/core/lie-group-base.hpp b/include/aligator/core/lie-group-base.hpp new file mode 100644 index 000000000..78c97410d --- /dev/null +++ b/include/aligator/core/lie-group-base.hpp @@ -0,0 +1,35 @@ +/// @file +/// @copyright Copyright (C) 2025 INRIA +#pragma once + +#include "aligator/fwd.hpp" + +namespace aligator { + +/// @brief Type traits for a Lie group. Usually required are the Lie group +/// dimension, corresponding Lie Algebra, etc. +template struct LieGroupTraits { + using Scalar = typename Derived::Scalar; + static constexpr int Dim = Derived::Dim; +}; + +#define ALIGATOR_LIEGROUP_TRAITS_DEFINE(Traits) \ + using Scalar = typename Traits::Derived; \ + static constexpr int Dim = Traits::Dim; \ + using LieAlgebraType = typename Traits::LieAlgebraType; \ + using DualLieAlgebraType = typename Traits::DualLieAlgebraType + +template struct LieGroupBase { + using Traits = LieGroupTraits; + ALIGATOR_LIEGROUP_TRAITS_DEFINE(Traits); + + Derived &derived() { return static_cast(*this); } + + const Derived &derived() const { return static_cast(*this); } + + Derived &const_cast_derived() const { + return const_cast(derived()); + } +}; + +} // namespace aligator