pinocchio  3.5.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
check-base.hpp
1 //
2 // Copyright (c) 2025 INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_check_base_hpp__
6 #define __pinocchio_algorithm_check_base_hpp__
7 
8 #include "pinocchio/multibody/fwd.hpp"
9 
10 namespace pinocchio
11 {
12 
14  template<typename AlgorithmCheckerDerived>
16  {
17  AlgorithmCheckerDerived & derived()
18  {
19  return *static_cast<AlgorithmCheckerDerived *>(this);
20  }
21 
22  const AlgorithmCheckerDerived & derived() const
23  {
24  return *static_cast<const AlgorithmCheckerDerived *>(this);
25  }
26 
27  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
28  bool checkModel(const ModelTpl<Scalar, Options, JointCollectionTpl> & model) const
29  {
30  return derived().checkModel_impl(model);
31  }
32  };
33 
34 } // namespace pinocchio
35 
36 #endif // __pinocchio_algorithm_check_base_hpp__
Main pinocchio namespace.
Definition: treeview.dox:11
CRTP class describing the API of the checkers.
Definition: check-base.hpp:16