6#ifndef THEORETICA_AUTODIFF_TYPES_H
7#define THEORETICA_AUTODIFF_TYPES_H
19 template<
typename Type>
20 struct is_dual_type : std::false_type {};
24 struct is_dual_type<dual> : std::true_type {};
29 template<
typename Function>
33 typename _internal::return_type_or_void<Function, dual>::type
35 std::true_type, std::false_type
41 template<
typename Function,
typename T =
bool>
42 using enable_dual_func =
43 typename std::enable_if<is_dual_func<Function>::value, T>::type;
47 template<
typename Type>
48 struct is_dual2_type : std::false_type {};
52 struct is_dual2_type<dual2> : std::true_type {};
57 template<
typename Function>
61 typename _internal::return_type_or_void<Function, dual2>::type
63 std::true_type, std::false_type
69 template<
typename Function,
typename T =
bool>
70 using enable_dual2_func =
71 typename std::enable_if<is_dual2_func<Function>::value, T>::type;
75 template<
typename Type>
76 struct is_multidual_type : std::false_type {};
79 template<
unsigned int N>
80 struct is_multidual_type<multidual<N>> : std::true_type {};
84 template<
typename Type,
typename T =
bool>
85 using enable_multidual =
86 typename std::enable_if<is_multidual_type<Type>::value, T>::type;
93 template<
typename Function,
typename T =
bool>
94 using enable_scalar_field =
typename std::enable_if <
95 is_multidual_type<return_type_t<Function>>::value, T
103 template<
typename Function,
typename T =
bool>
104 using enable_vector_field =
typename std::enable_if <
106 vector_element_t<return_type_t<Function>>
116 template<
unsigned int N = 0>
121 template<
unsigned int N = 0>
multidual< N > dreal_t
Real type for multivariate automatic differentiation (read "differential real").
Definition autodiff_types.h:117
dvec_t< 2 > dvec2
Vector type for multivariate automatic differentiation with two-dimensional statically allocated vect...
Definition autodiff_types.h:140
dvec_t< 0 > dvec
Vector type for multivariate automatic differentiation with dynamically allocated vectors.
Definition autodiff_types.h:131
dreal_t< 4 > dreal4
Real type for multivariate automatic differentiation with four-dimensional statically allocated vecto...
Definition autodiff_types.h:154
dreal_t< 0 > dreal
Real type for multivariate automatic differentiation with dynamically allocated vectors.
Definition autodiff_types.h:127
dreal_t< 2 > dreal2
Real type for multivariate automatic differentiation with two-dimensional statically allocated vector...
Definition autodiff_types.h:136
vec< dreal_t< N >, N > dvec_t
Vector type for multivariate automatic differentiation (read "differential vector").
Definition autodiff_types.h:122
dvec_t< 3 > dvec3
Vector type for multivariate automatic differentiation with three-dimensional statically allocated ve...
Definition autodiff_types.h:149
dvec_t< 4 > dvec4
Vector type for multivariate automatic differentiation with four-dimensional statically allocated vec...
Definition autodiff_types.h:158
dreal_t< 3 > dreal3
Real type for multivariate automatic differentiation with three-dimensional statically allocated vect...
Definition autodiff_types.h:145
Main namespace of the library which contains all functions and objects.
Definition algebra.h:27