Theoretica
A C++ numerical and automatic mathematical library
autodiff_types.h File Reference

Types and traits for automatic differentiation. More...

Go to the source code of this file.

Classes

struct  theoretica::autodiff::is_dual_type< Type >
 Type trait to check whether the given type is a multidual number. More...
 
struct  theoretica::autodiff::is_dual_type< dual >
 Type trait to check whether the given type is a multidual number. More...
 
struct  theoretica::autodiff::is_dual2_type< Type >
 Type trait to check whether the given type is a multidual number. More...
 
struct  theoretica::autodiff::is_dual2_type< dual2 >
 Type trait to check whether the given type is a multidual number. More...
 
struct  theoretica::autodiff::is_multidual_type< Type >
 Type trait to check whether the given type is a multidual number. More...
 
struct  theoretica::autodiff::is_multidual_type< multidual< N > >
 Type trait to check whether the given type is a multidual number. More...
 

Namespaces

 theoretica
 Main namespace of the library which contains all functions and objects.
 
 theoretica::autodiff
 Differential operators with automatic differentiation.
 

Typedefs

template<typename Function >
using theoretica::autodiff::is_dual_func = std::conditional_t< is_dual_type< typename _internal::return_type_or_void< Function, dual >::type >::value, std::true_type, std::false_type >
 Type trait to check whether the given function takes a dual number as its first argument.
 
template<typename Function , typename T = bool>
using theoretica::autodiff::enable_dual_func = typename std::enable_if< is_dual_func< Function >::value, T >::type
 Enable a certain function overload if the given type is a function taking as first argument a dual number.
 
template<typename Function >
using theoretica::autodiff::is_dual2_func = std::conditional_t< is_dual2_type< typename _internal::return_type_or_void< Function, dual2 >::type >::value, std::true_type, std::false_type >
 Type trait to check whether the given function takes a dual2 number as its first argument.
 
template<typename Function , typename T = bool>
using theoretica::autodiff::enable_dual2_func = typename std::enable_if< is_dual2_func< Function >::value, T >::type
 Enable a certain function overload if the given type is a function taking as first argument a dual2 number.
 
template<typename Type , typename T = bool>
using theoretica::autodiff::enable_multidual = typename std::enable_if< is_multidual_type< Type >::value, T >::type
 Enable a certain function overload if the given type is an instantiation of the multidual template class.
 
template<typename Function , typename T = bool>
using theoretica::autodiff::enable_scalar_field = typename std::enable_if< is_multidual_type< return_type_t< Function > >::value, T >::type
 Enable a certain function overload if the given type is a Callable object corresponding to a multidual function representing a scalar field, that is, a function taking a dvec_t and returning a dreal_t.
 
template<typename Function , typename T = bool>
using theoretica::autodiff::enable_vector_field = typename std::enable_if< is_multidual_type< vector_element_t< return_type_t< Function > > >::value, T >::type
 Enable a certain function overload if the given type is a Callable object corresponding to a multidual function representing a vector field, that is, a function taking a dvec_t and returning a dvec_t.
 
template<unsigned int N = 0>
using theoretica::autodiff::dreal_t = multidual< N >
 Real type for multivariate automatic differentiation (read "differential real").
 
template<unsigned int N = 0>
using theoretica::autodiff::dvec_t = vec< dreal_t< N >, N >
 Vector type for multivariate automatic differentiation (read "differential vector").
 
using theoretica::autodiff::dreal = dreal_t< 0 >
 Real type for multivariate automatic differentiation with dynamically allocated vectors.
 
using theoretica::autodiff::dvec = dvec_t< 0 >
 Vector type for multivariate automatic differentiation with dynamically allocated vectors.
 
using theoretica::autodiff::dreal2 = dreal_t< 2 >
 Real type for multivariate automatic differentiation with two-dimensional statically allocated vectors.
 
using theoretica::autodiff::dvec2 = dvec_t< 2 >
 Vector type for multivariate automatic differentiation with two-dimensional statically allocated vectors.
 
using theoretica::autodiff::dreal3 = dreal_t< 3 >
 Real type for multivariate automatic differentiation with three-dimensional statically allocated vectors.
 
using theoretica::autodiff::dvec3 = dvec_t< 3 >
 Vector type for multivariate automatic differentiation with three-dimensional statically allocated vectors.
 
using theoretica::autodiff::dreal4 = dreal_t< 4 >
 Real type for multivariate automatic differentiation with four-dimensional statically allocated vectors.
 
using theoretica::autodiff::dvec4 = dvec_t< 4 >
 Vector type for multivariate automatic differentiation with four-dimensional statically allocated vectors.
 

Detailed Description

Types and traits for automatic differentiation.