5#ifndef __pinocchio_autodiff_cppad_utils_static_if_hpp__
6#define __pinocchio_autodiff_cppad_utils_static_if_hpp__
8#include "pinocchio/utils/static-if.hpp"
14 template<
typename Scalar,
typename ThenType,
typename ElseType>
15 struct if_then_else_impl<CppAD::AD<Scalar>, CppAD::AD<Scalar>, ThenType, ElseType>
17 typedef typename internal::traits<if_then_else_impl>::ReturnType ReturnType;
19 static inline ReturnType run(
20 const ComparisonOperators op,
21 const CppAD::AD<Scalar> & lhs_value,
22 const CppAD::AD<Scalar> & rhs_value,
23 const ThenType & then_value,
24 const ElseType & else_value)
29 return ::CppAD::CondExpLt<Scalar>(lhs_value, rhs_value, then_value, else_value);
31 return ::CppAD::CondExpLe<Scalar>(lhs_value, rhs_value, then_value, else_value);
33 return ::CppAD::CondExpEq<Scalar>(lhs_value, rhs_value, then_value, else_value);
35 return ::CppAD::CondExpGe<Scalar>(lhs_value, rhs_value, then_value, else_value);
37 return ::CppAD::CondExpGt<Scalar>(lhs_value, rhs_value, then_value, else_value);
Main pinocchio namespace.