Classes | |
struct | IsDirection |
If the expression inherits from Direction. Is either std::false_type or std::true_type. More... | |
struct | TraitsImplementation |
Common traits for all types used as gradients. More... | |
Typedefs | |
Detection of specific gradient types | |
template<typename Gradient > | |
using | EnableIfDirection = typename std::enable_if<IsDirection<Gradient>::value>::type |
Enable if wrapper for EnableIfDirection. | |
General gradient traits | |
template<typename Gradient > | |
using | Real = typename TraitsImplementation<Gradient>::Real |
The base value used in the gradient entries. | |
template<typename Gradient > | |
size_t constexpr | dim () |
Number of dimensions this gradient value has. | |
template<typename Gradient > | |
TraitsImplementation< Gradient >::Real & | at (Gradient &gradient, size_t dim) |
Get the entry at the given index. | |
template<typename Gradient > | |
TraitsImplementation< Gradient >::Real const & | at (Gradient const &gradient, size_t dim) |
Get the entry at the given index. | |
template<typename Gradient > | |
std::array< AtomicTraits::RemoveAtomic< typename TraitsImplementation< Gradient >::Real >, TraitsImplementation< Gradient >::dim > | toArray (Gradient const &gradient) |
Converts the (possibly multi-component) gradient to an array of Reals. | |
Traits for everything that can be an used as a gradient (adjoint, tangent) usually the second template argument of CoDi Gen types codi::RealReverseGen. Possible types are double, codi::RealReverse, codi::Direction etc..
using codi::GradientTraits::Real = typename TraitsImplementation<Gradient>::Real |
The base value used in the gradient entries.
|
inline |
Get the entry at the given index.
|
inline |
Get the entry at the given index.
|
inlineconstexpr |
Number of dimensions this gradient value has.
|
inline |
Converts the (possibly multi-component) gradient to an array of Reals.