ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Functions
tiny_ad.hpp File Reference

(Last Changed on January 19, 2022 for git-revision 9daea396376f6c901ed020bbe90a82f15c6de9cd.)

#include <cmath>
#include <iostream>
#include "tiny_vec.hpp"

Go to the source code of this file.

Classes

struct  tiny_ad::ad< Type, Vector >
 
struct  tiny_ad::variable< order, nvar, Double >
 
struct  tiny_ad::variable< 1, nvar, Double >
 

Namespaces

 tiny_ad
 

Macros

#define COMPARISON_OPERATOR(OP)
 
#define COMPARISON_OPERATOR_FLIP(OP1, OP2)
 
#define CSKIP(x)   x
 
#define TINY_VECTOR(type, size)   tiny_vec<type, size>
 
#define UNARY_MATH_DERIVATIVE(F, DF)
 
#define UNARY_MATH_ZERO_DERIV(F)
 
#define VARIABLE(order, nvar, scalartype)   variable<order, nvar, scalartype>
 

Functions

template<class T >
tiny_ad::D_acos (const T &x)
 
template<class T >
tiny_ad::D_asin (const T &x)
 
template<class T >
tiny_ad::D_atan (const T &x)
 
template<class T >
tiny_ad::D_log1p (const T &x)
 
template<class T >
tiny_ad::D_tan (const T &x)
 
template<class T >
tiny_ad::D_tanh (const T &x)
 
template<class T , class V >
bool tiny_ad::isfinite (const ad< T, V > &x)
 
template<class T , class V >
ad< T, V > tiny_ad::operator* (const double &x, const ad< T, V > &y)
 
template<class T , class V >
ad< T, V > tiny_ad::operator+ (const double &x, const ad< T, V > &y)
 
template<class T , class V >
ad< T, V > tiny_ad::operator- (const double &x, const ad< T, V > &y)
 
template<class T , class V >
ad< T, V > tiny_ad::operator/ (const double &x, const ad< T, V > &y)
 
template<class T , class V >
std::ostream & tiny_ad::operator<< (std::ostream &os, const ad< T, V > &x)
 
template<class T , class V >
ad< T, V > tiny_ad::pow (const ad< T, V > &x, const ad< T, V > &y)
 
template<class T , class V >
ad< T, V > tiny_ad::pow (const ad< T, V > &x, const double &y)
 
template<class T >
double tiny_ad::sign (const T &x)
 

Macro Definition Documentation

#define COMPARISON_OPERATOR (   OP)
Value:
template<class other> \
bool operator OP (const other &x) const{ \
return (value OP x); \
}
#define x
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69

Definition at line 60 of file tiny_ad.hpp.

#define COMPARISON_OPERATOR_FLIP (   OP1,
  OP2 
)
Value:
template<class T, class V> \
bool operator OP1 (const double &x, const ad<T, V> &y) { \
return y.operator OP2(x); \
}
#define x

Definition at line 209 of file tiny_ad.hpp.

#define CSKIP (   x)    x

Definition at line 11 of file tiny_ad.hpp.

#define TINY_VECTOR (   type,
  size 
)    tiny_vec<type, size>

Definition at line 23 of file tiny_ad.hpp.

#define UNARY_MATH_DERIVATIVE (   F,
  DF 
)
Value:
template<class T, class V> \
ad<T, V> F (const ad<T, V> &x){ \
return ad<T, V>(F (x.value), \
T(DF(x.value)) * x.deriv); \
}
#define x

Definition at line 152 of file tiny_ad.hpp.

#define UNARY_MATH_ZERO_DERIV (   F)
Value:
template<class T, class V> \
double F (const ad<T, V> &x){ \
return F(x.value); \
}
#define x

Definition at line 133 of file tiny_ad.hpp.

#define VARIABLE (   order,
  nvar,
  scalartype 
)    variable<order, nvar, scalartype>

Definition at line 263 of file tiny_ad.hpp.