Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
BasedOnStyle: Google
SortIncludes: false
Standard: Cpp03
Standard: Cpp11
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

# pre-commit run -a (Guilhem Saurel, 2024-02-19)
0bae435330ee475f8dbb11bf5e672284d294d9b3

# pre-commit run -a (ManifoldFR, 2025-04-25)
51b49061575d46e0668eba0da200217cbfd9e883
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ repos:
rev: v20.1.0
hooks:
- id: clang-format
args:
- '--style={BasedOnStyle: Google, SortIncludes: false, Standard: Cpp03}'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Fix handling of non sorted sparse matrix ([#538](https://github.com/stack-of-tasks/eigenpy/pull/538))

### Changed

- Update clang-format standard to C++11, reformat code

## [3.10.3] - 2025-02-11

### Added
Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/alignment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ namespace objects {

// Force alignment of instance with value_holder
template <typename Derived>
struct instance<value_holder<Derived> >
: ::eigenpy::aligned_instance<value_holder<Derived> > {};
struct instance<value_holder<Derived>>
: ::eigenpy::aligned_instance<value_holder<Derived>> {};

} // namespace objects
} // namespace python
Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/angle-axis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ template <typename AngleAxis>
class AngleAxisVisitor;

template <typename Scalar>
struct call<Eigen::AngleAxis<Scalar> > {
struct call<Eigen::AngleAxis<Scalar>> {
typedef Eigen::AngleAxis<Scalar> AngleAxis;

static inline void expose() { AngleAxisVisitor<AngleAxis>::expose(); }
Expand All @@ -26,7 +26,7 @@ struct call<Eigen::AngleAxis<Scalar> > {
};

template <typename AngleAxis>
class AngleAxisVisitor : public bp::def_visitor<AngleAxisVisitor<AngleAxis> > {
class AngleAxisVisitor : public bp::def_visitor<AngleAxisVisitor<AngleAxis>> {
typedef typename AngleAxis::Scalar Scalar;
typedef typename AngleAxis::Vector3 Vector3;
typedef typename AngleAxis::Matrix3 Matrix3;
Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/copyable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {
/// copy constructor.
///
template <class C>
struct CopyableVisitor : public bp::def_visitor<CopyableVisitor<C> > {
struct CopyableVisitor : public bp::def_visitor<CopyableVisitor<C>> {
template <class PyClass>
void visit(PyClass& cl) const {
cl.def("copy", &copy, bp::arg("self"), "Returns a copy of *this.");
Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/decompositions/ColPivHouseholderQR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {
template <typename _MatrixType>
struct ColPivHouseholderQRSolverVisitor
: public boost::python::def_visitor<
ColPivHouseholderQRSolverVisitor<_MatrixType> > {
ColPivHouseholderQRSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {
template <typename _MatrixType>
struct CompleteOrthogonalDecompositionSolverVisitor
: public boost::python::def_visitor<
CompleteOrthogonalDecompositionSolverVisitor<_MatrixType> > {
CompleteOrthogonalDecompositionSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/decompositions/EigenSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace eigenpy {

template <typename _MatrixType>
struct EigenSolverVisitor
: public boost::python::def_visitor<EigenSolverVisitor<_MatrixType> > {
: public boost::python::def_visitor<EigenSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef Eigen::EigenSolver<MatrixType> Solver;
Expand All @@ -26,7 +26,7 @@ struct EigenSolverVisitor
cl.def(bp::init<>("Default constructor"))
.def(bp::init<Eigen::DenseIndex>(
bp::arg("size"), "Default constructor with memory preallocation"))
.def(bp::init<MatrixType, bp::optional<bool> >(
.def(bp::init<MatrixType, bp::optional<bool>>(
bp::args("matrix", "compute_eigen_vectors"),
"Computes eigendecomposition of given matrix"))

Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/decompositions/FullPivHouseholderQR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {
template <typename _MatrixType>
struct FullPivHouseholderQRSolverVisitor
: public boost::python::def_visitor<
FullPivHouseholderQRSolverVisitor<_MatrixType> > {
FullPivHouseholderQRSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/decompositions/HouseholderQR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {
template <typename _MatrixType>
struct HouseholderQRSolverVisitor
: public boost::python::def_visitor<
HouseholderQRSolverVisitor<_MatrixType> > {
HouseholderQRSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/decompositions/LDLT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace eigenpy {

template <typename _MatrixType>
struct LDLTSolverVisitor
: public boost::python::def_visitor<LDLTSolverVisitor<_MatrixType> > {
: public boost::python::def_visitor<LDLTSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/decompositions/LLT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace eigenpy {

template <typename _MatrixType>
struct LLTSolverVisitor
: public boost::python::def_visitor<LLTSolverVisitor<_MatrixType> > {
: public boost::python::def_visitor<LLTSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/decompositions/PermutationMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ template <int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime,
typename StorageIndex_ = int>
struct PermutationMatrixVisitor
: public boost::python::def_visitor<PermutationMatrixVisitor<
SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_> > {
SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>> {
typedef StorageIndex_ StorageIndex;
typedef Eigen::PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime,
StorageIndex>
Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/decompositions/SelfAdjointEigenSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace eigenpy {
template <typename _MatrixType>
struct SelfAdjointEigenSolverVisitor
: public boost::python::def_visitor<
SelfAdjointEigenSolverVisitor<_MatrixType> > {
SelfAdjointEigenSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef Eigen::SelfAdjointEigenSolver<MatrixType> Solver;
Expand All @@ -28,7 +28,7 @@ struct SelfAdjointEigenSolverVisitor
.def(bp::init<Eigen::DenseIndex>(
bp::args("self", "size"),
"Default constructor with memory preallocation"))
.def(bp::init<MatrixType, bp::optional<int> >(
.def(bp::init<MatrixType, bp::optional<int>>(
bp::args("self", "matrix", "options"),
"Computes eigendecomposition of given matrix"))

Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/decompositions/minres.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace eigenpy {
template <typename _Solver>
struct IterativeSolverBaseVisitor
: public boost::python::def_visitor<IterativeSolverBaseVisitor<_Solver> > {
: public boost::python::def_visitor<IterativeSolverBaseVisitor<_Solver>> {
typedef _Solver Solver;
typedef typename Solver::MatrixType MatrixType;
typedef typename Solver::Preconditioner Preconditioner;
Expand Down Expand Up @@ -123,7 +123,7 @@ struct IterativeSolverBaseVisitor

template <typename _MatrixType>
struct MINRESSolverVisitor
: public boost::python::def_visitor<MINRESSolverVisitor<_MatrixType> > {
: public boost::python::def_visitor<MINRESSolverVisitor<_MatrixType>> {
typedef _MatrixType MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/decompositions/sparse/LDLT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace eigenpy {

template <typename _MatrixType, int _UpLo = Eigen::Lower,
typename _Ordering =
Eigen::AMDOrdering<typename _MatrixType::StorageIndex> >
Eigen::AMDOrdering<typename _MatrixType::StorageIndex>>
struct SimplicialLDLTVisitor
: public boost::python::def_visitor<
SimplicialLDLTVisitor<_MatrixType, _UpLo, _Ordering> > {
SimplicialLDLTVisitor<_MatrixType, _UpLo, _Ordering>> {
typedef SimplicialLDLTVisitor<_MatrixType, _UpLo, _Ordering> Visitor;
typedef _MatrixType MatrixType;

Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/decompositions/sparse/LLT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace eigenpy {

template <typename _MatrixType, int _UpLo = Eigen::Lower,
typename _Ordering =
Eigen::AMDOrdering<typename _MatrixType::StorageIndex> >
Eigen::AMDOrdering<typename _MatrixType::StorageIndex>>
struct SimplicialLLTVisitor
: public boost::python::def_visitor<
SimplicialLLTVisitor<_MatrixType, _UpLo, _Ordering> > {
SimplicialLLTVisitor<_MatrixType, _UpLo, _Ordering>> {
typedef SimplicialLLTVisitor<_MatrixType, _UpLo, _Ordering> Visitor;
typedef _MatrixType MatrixType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace eigenpy {
template <typename SimplicialDerived>
struct SimplicialCholeskyVisitor
: public boost::python::def_visitor<
SimplicialCholeskyVisitor<SimplicialDerived> > {
SimplicialCholeskyVisitor<SimplicialDerived>> {
typedef SimplicialDerived Solver;

typedef typename SimplicialDerived::MatrixType MatrixType;
Expand Down
2 changes: 1 addition & 1 deletion include/eigenpy/decompositions/sparse/SparseSolverBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {
template <typename SimplicialDerived>
struct SparseSolverBaseVisitor
: public boost::python::def_visitor<
SparseSolverBaseVisitor<SimplicialDerived> > {
SparseSolverBaseVisitor<SimplicialDerived>> {
typedef SimplicialDerived Solver;

typedef typename SimplicialDerived::MatrixType MatrixType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {

template <typename AccelerateDerived>
struct AccelerateImplVisitor : public boost::python::def_visitor<
AccelerateImplVisitor<AccelerateDerived> > {
AccelerateImplVisitor<AccelerateDerived>> {
typedef AccelerateDerived Solver;

typedef typename AccelerateDerived::MatrixType MatrixType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace eigenpy {

template <typename CholdmodDerived>
struct CholmodBaseVisitor
: public boost::python::def_visitor<CholmodBaseVisitor<CholdmodDerived> > {
: public boost::python::def_visitor<CholmodBaseVisitor<CholdmodDerived>> {
typedef CholdmodDerived Solver;

typedef typename CholdmodDerived::MatrixType MatrixType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace eigenpy {
template <typename CholdmodDerived>
struct CholmodDecompositionVisitor
: public boost::python::def_visitor<
CholmodDecompositionVisitor<CholdmodDerived> > {
CholmodDecompositionVisitor<CholdmodDerived>> {
typedef CholdmodDerived Solver;

template <class PyClass>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace eigenpy {
template <typename MatrixType_, int UpLo_ = Eigen::Lower>
struct CholmodSimplicialLDLTVisitor
: public boost::python::def_visitor<
CholmodSimplicialLDLTVisitor<MatrixType_, UpLo_> > {
CholmodSimplicialLDLTVisitor<MatrixType_, UpLo_>> {
typedef MatrixType_ MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace eigenpy {
template <typename MatrixType_, int UpLo_ = Eigen::Lower>
struct CholmodSimplicialLLTVisitor
: public boost::python::def_visitor<
CholmodSimplicialLLTVisitor<MatrixType_, UpLo_> > {
CholmodSimplicialLLTVisitor<MatrixType_, UpLo_>> {
typedef MatrixType_ MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace eigenpy {
template <typename MatrixType_, int UpLo_ = Eigen::Lower>
struct CholmodSupernodalLLTVisitor
: public boost::python::def_visitor<
CholmodSupernodalLLTVisitor<MatrixType_, UpLo_> > {
CholmodSupernodalLLTVisitor<MatrixType_, UpLo_>> {
typedef MatrixType_ MatrixType;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Expand Down
8 changes: 4 additions & 4 deletions include/eigenpy/details.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType>, Scalar> {
// to-python
EigenToPyConverter<MatType>::registration();
#if EIGEN_VERSION_AT_LEAST(3, 2, 0)
EigenToPyConverter<Eigen::Ref<MatType> >::registration();
EigenToPyConverter<const Eigen::Ref<const MatType> >::registration();
EigenToPyConverter<Eigen::Ref<MatType>>::registration();
EigenToPyConverter<const Eigen::Ref<const MatType>>::registration();
#endif

// from-python
Expand Down Expand Up @@ -67,9 +67,9 @@ struct expose_eigen_type_impl<TensorType, Eigen::TensorBase<TensorType>,

// to-python
EigenToPyConverter<TensorType>::registration();
EigenToPyConverter<Eigen::TensorRef<TensorType> >::registration();
EigenToPyConverter<Eigen::TensorRef<TensorType>>::registration();
EigenToPyConverter<
const Eigen::TensorRef<const TensorType> >::registration();
const Eigen::TensorRef<const TensorType>>::registration();

// from-python
EigenFromPyConverter<TensorType>::registration();
Expand Down
24 changes: 12 additions & 12 deletions include/eigenpy/eigen-allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ template <typename EigenType,
struct check_swap_impl;

template <typename MatType>
struct check_swap_impl<MatType, Eigen::MatrixBase<MatType> >
struct check_swap_impl<MatType, Eigen::MatrixBase<MatType>>
: check_swap_impl_matrix<MatType> {};

template <typename MatType>
Expand Down Expand Up @@ -127,7 +127,7 @@ struct check_swap_impl_tensor {
};

template <typename TensorType>
struct check_swap_impl<TensorType, Eigen::TensorBase<TensorType> >
struct check_swap_impl<TensorType, Eigen::TensorBase<TensorType>>
: check_swap_impl_tensor<TensorType> {};
#endif

Expand Down Expand Up @@ -294,11 +294,11 @@ template <typename MatType>
struct eigen_allocator_impl_matrix;

template <typename MatType>
struct eigen_allocator_impl<MatType, Eigen::MatrixBase<MatType> >
struct eigen_allocator_impl<MatType, Eigen::MatrixBase<MatType>>
: eigen_allocator_impl_matrix<MatType> {};

template <typename MatType>
struct eigen_allocator_impl<const MatType, const Eigen::MatrixBase<MatType> >
struct eigen_allocator_impl<const MatType, const Eigen::MatrixBase<MatType>>
: eigen_allocator_impl_matrix<const MatType> {};

template <typename MatType>
Expand Down Expand Up @@ -362,12 +362,12 @@ template <typename TensorType>
struct eigen_allocator_impl_tensor;

template <typename TensorType>
struct eigen_allocator_impl<TensorType, Eigen::TensorBase<TensorType> >
struct eigen_allocator_impl<TensorType, Eigen::TensorBase<TensorType>>
: eigen_allocator_impl_tensor<TensorType> {};

template <typename TensorType>
struct eigen_allocator_impl<const TensorType,
const Eigen::TensorBase<TensorType> >
const Eigen::TensorBase<TensorType>>
: eigen_allocator_impl_tensor<const TensorType> {};

template <typename TensorType>
Expand Down Expand Up @@ -462,7 +462,7 @@ inline bool is_arr_layout_compatible_with_mat_type(PyArrayObject *pyArray) {
}

template <typename MatType, int Options, typename Stride>
struct eigen_allocator_impl_matrix<Eigen::Ref<MatType, Options, Stride> > {
struct eigen_allocator_impl_matrix<Eigen::Ref<MatType, Options, Stride>> {
typedef Eigen::Ref<MatType, Options, Stride> RefType;
typedef typename MatType::Scalar Scalar;

Expand Down Expand Up @@ -523,7 +523,7 @@ struct eigen_allocator_impl_matrix<Eigen::Ref<MatType, Options, Stride> > {

template <typename MatType, int Options, typename Stride>
struct eigen_allocator_impl_matrix<
const Eigen::Ref<const MatType, Options, Stride> > {
const Eigen::Ref<const MatType, Options, Stride>> {
typedef const Eigen::Ref<const MatType, Options, Stride> RefType;
typedef typename MatType::Scalar Scalar;

Expand Down Expand Up @@ -590,14 +590,14 @@ template <typename TensorType, typename TensorRef>
struct eigen_allocator_impl_tensor_ref;

template <typename TensorType>
struct eigen_allocator_impl_tensor<Eigen::TensorRef<TensorType> >
struct eigen_allocator_impl_tensor<Eigen::TensorRef<TensorType>>
: eigen_allocator_impl_tensor_ref<TensorType,
Eigen::TensorRef<TensorType> > {};
Eigen::TensorRef<TensorType>> {};

template <typename TensorType>
struct eigen_allocator_impl_tensor<const Eigen::TensorRef<const TensorType> >
struct eigen_allocator_impl_tensor<const Eigen::TensorRef<const TensorType>>
: eigen_allocator_impl_tensor_ref<
const TensorType, const Eigen::TensorRef<const TensorType> > {};
const TensorType, const Eigen::TensorRef<const TensorType>> {};

template <typename TensorType, typename RefType>
struct eigen_allocator_impl_tensor_ref {
Expand Down
Loading
Loading