ADMB Documentation
-a65f1c97
|
Functions | |
double | avg (double x, double y) |
Average of two numbers; constant objects. More... | |
prevariable & | cube (const prevariable &v1) |
Returns variable result of v1 cubed. More... | |
double | cube (const double m) |
Cube of a number; constant objects. More... | |
prevariable & | fabs (const prevariable &v1) |
Absolute value. More... | |
prevariable & | fourth (const prevariable &v1) |
Returns variable result of v1 raised to the power of four. More... | |
double | fourth (const double m) |
Fourth power of a number; constant objects. More... | |
dvariable | max (const dvar_vector &variables) |
Return a copy of the maximum element in variables vector. More... | |
int | max (int a, int b) |
Largest of two integer; constant objects. More... | |
dvariable | mfexp (const prevariable &x, double b) |
Robust exponential function for variable argument with user specified domain bound. More... | |
double | mfexp (double x, double b) |
Robust exponential function for constant argument with user specified domain bound. More... | |
dvariable | mfexp (const prevariable &x) |
Robust exponential function for variable argument > 60 or < -60. More... | |
double | mfexp (double x) |
Robust exponential function for constant argument > 60 or < -60. More... | |
dvariable | min (const dvar_vector &variables) |
Return a copy of the minimum element in variables vector. More... | |
dvariable | posfun (const dvariable &x, const double eps, const prevariable &_pen) |
Retuns a positive function of the argument and sets a penalty for . More... | |
dvariable | posfun (const dvariable &x, const double eps, const dvariable &_pen) |
Retuns a positive function of the argument and sets a penalty for . More... | |
double | posfun (const double &x, const double eps, const double &_pen) |
Retuns a positive function of the argument and sets a penalty for . More... | |
double | posfun2 (const double &x, const double eps, const double &_pen) |
Retuns a positive function of the argument and sets a penalty for . More... | |
dvariable | posfun2 (const dvariable &x, const double eps, const prevariable &_pen) |
Retuns a positive function of the argument and sets a penalty for . More... | |
prevariable & | sfabs (const prevariable &v1) |
Smooth absolute value. More... | |
double | square (const double value) |
Return square of value; constant object. More... | |
dvector | square (const dvector &values) |
Return dvector results of squaring elements in a values; constant vector object. More... | |
ivector | square (const ivector &values) |
Return dvector results of squaring elements in a values; constant vector object. More... | |
dmatrix | square (const dmatrix &a) |
Square of a elements in a matrix; constant matrix object. More... | |
d3_array | square (const d3_array &a) |
Square of elements in a 3-dimensional array; constant 3-dimensionsal array. More... | |
char | which_library () |
Get ADMB library mode. More... | |
ADMB functions to perform common operations. These functions are typically optimized for automatic differentiation and automatically invoke custom adjoint code.
double avg | ( | double | x, |
double | y | ||
) |
Average of two numbers; constant objects.
x | A double |
y | A double |
Definition at line 42 of file dvector.cpp.
prevariable& cube | ( | const prevariable & | v1 | ) |
Returns variable result of v1 cubed.
v1 | variable base |
Definition at line 18 of file fvar_op8.cpp.
double cube | ( | const double | m | ) |
Cube of a number; constant objects.
m | Number to be cubed |
Definition at line 694 of file dvector.cpp.
prevariable& fabs | ( | const prevariable & | v1 | ) |
Absolute value.
Simple overload of standard C library function. Not differentiable and should not be used in cases where an independent variable is expected to change sign. Use sfabs in such cases.
v1 | Indpendent variable |
Definition at line 105 of file fvar_fn.cpp.
prevariable& fourth | ( | const prevariable & | v1 | ) |
Returns variable result of v1 raised to the power of four.
v1 | variable base |
Definition at line 38 of file fvar_op8.cpp.
double fourth | ( | const double | m | ) |
Fourth power of a number; constant objects.
m | Number to be taken to the fourth power. |
Definition at line 704 of file dvector.cpp.
Referenced by gammlnguts().
dvariable max | ( | const dvar_vector & | variables | ) |
Return a copy of the maximum element in variables vector.
variables | is a dvar_vector |
Definition at line 18 of file fvar_a11.cpp.
int max | ( | int | a, |
int | b | ||
) |
Largest of two integer; constant objects.
a | An integer |
b | An integer |
Definition at line 681 of file dvector.cpp.
dvariable mfexp | ( | const prevariable & | x, |
double | b | ||
) |
double mfexp | ( | double | x, |
double | b | ||
) |
Robust exponential function for constant argument with user specified domain bound.
Prevents overflow and underflow for arguments outside of the domain
x | exponent. |
b | ouble user specified function domain bound. |
Definition at line 22 of file mfexpcon.cpp.
dvariable mfexp | ( | const prevariable & | x | ) |
double mfexp | ( | double | x | ) |
Robust exponential function for constant argument > 60 or < -60.
Prevents overflow and underflow for arguments outside of the domain of exp(). (Note: .)
x | exponent. |
Definition at line 47 of file mfexpcon.cpp.
dvariable min | ( | const dvar_vector & | variables | ) |
Return a copy of the minimum element in variables vector.
variables | is a dvar_vector |
Definition at line 36 of file fvar_a11.cpp.
dvariable posfun | ( | const dvariable & | x, |
const double | eps, | ||
const prevariable & | _pen | ||
) |
Retuns a positive function of the argument and sets a penalty for .
This function will add the penalty (when applicable) onto the existing value of pen. Somewhere in the code after using posfun, the penalty should be added to the objective function. This function is intended to keep model state variables in the positive domain to avoid mathematical errors. See Section 2.3 of the ADMB Manual. (Note, the returned value is less than .)
x | Argument, . |
eps | Threshold, , a double constant. The choice of a value for is model dependent, but is sufficient for some applications. |
_pen | The penalty value incremented by if . |
Definition at line 32 of file posfunv.cpp.
Retuns a positive function of the argument and sets a penalty for .
This function will add the penalty (when applicable) onto the existing value of pen. Somewhere in the code after using posfun, the penalty should be added to the objective function. This function is intended to keep model state variables in the positive domain to avoid mathematical errors. See Section 2.3 of the ADMB Manual. (Note, the returned value is less than .)
x | Argument, . |
eps | Threshold, , a double constant. The choice of a value for is model dependent, but is sufficient for some applications. |
_pen | The penalty value incremented by if . |
Definition at line 52 of file posfunv.cpp.
double posfun | ( | const double & | x, |
const double | eps, | ||
const double & | _pen | ||
) |
Retuns a positive function of the argument and sets a penalty for .
This function will add the penalty (when applicable) onto the existing value of pen. Somewhere in the code after using posfun, the penalty should be added to the objective function. This function is intended to keep model state variables in the positive domain to avoid mathematical errors. See Section 2.3 of the ADMB Manual. (Note, the returned value is less than .)
x | Argument, . |
eps | Threshold, , a double constant. The choice of a value for is model dependent, but is sufficient for some applications. |
_pen | The penalty value incremented by if . |
Definition at line 57 of file posfunc.cpp.
double posfun2 | ( | const double & | x, |
const double | eps, | ||
const double & | _pen | ||
) |
Retuns a positive function of the argument and sets a penalty for .
A more coersive version. The penalty should be added to the objective function. This function is intended to keep model state variables in the positive domain to avoid mathematical errors. See Section 2.3 of the ADMB Manual.
x | Argument, . |
eps | Threshold, , a double constant containing the minimum allowed value of . |
_pen | The penalty value incremented by if . The choice of a value for is model dependent, but is sufficient for some applications. |
Definition at line 77 of file posfunc.cpp.
dvariable posfun2 | ( | const dvariable & | x, |
const double | eps, | ||
const prevariable & | _pen | ||
) |
Retuns a positive function of the argument and sets a penalty for .
A more coersive version. The penalty should be added to the objective function. This function is intended to keep model state variables in the positive domain to avoid mathematical errors. See Section 2.3 of the ADMB Manual.
x | Argument, . |
eps | Threshold, , a double constant containing the minimum allowed value of . |
_pen | The penalty value incremented by if . The choice of a value for is model dependent, but is sufficient for some applications. |
Definition at line 88 of file posfunv.cpp.
prevariable& sfabs | ( | const prevariable & | v1 | ) |
Smooth absolute value.
Uses thrid order polynomial to interpolate between += 0.001. Derivatives correct for all values of indpendent variable != 0.
v1 | Indpendent variable |
Definition at line 125 of file fvar_fn.cpp.
double square | ( | const double | value | ) |
Return square of value; constant object.
value | to be squared. |
Definition at line 16 of file d3arr4.cpp.
Referenced by AD_df1_atan(), AD_df1_tan(), AD_df2_atan(), AD_df2_tan(), AD_df3_atan(), AD_df3_tan(), AD_pow_22(), atan(), calculate_importance_sample_block_diagonal(), calculate_importance_sample_block_diagonal_funnel(), calculate_importance_sample_block_diagonal_option2(), calculate_importance_sample_block_diagonal_option_antithetical(), calculate_importance_sample_funnel(), cube(), df_cumd_normal_logistic_mixture(), dfboundp(), dfcholeski_sparse(), dflogistic(), dfposfun(), dlnorm(), dmultinom(), dnorm(), do_gauss_hermite_block_diagonal(), do_gauss_hermite_block_diagonal_multi(), dstudent_t(), exp(), fcomp1(), gammlnguts(), get_ft(), param_init_bounded_vector::get_jacobian(), inv(), inv_cumd_beta_stable(), inv_cumd_gamma(), inv_cumd_norm_logistic(), inv_cumd_normal_logistic_mixture(), inv_cumd_normal_mixture(), laplace_approximation_calculator::local_minimization_routine(), log(), log_der_logistic(), function_minimizer::mcmc_routine(), mf_upper_bound(), mf_upper_bound2(), multifan(), ndfboundp(), nllLognormal(), nllLognormal2(), nllNormal(), nllNormal2(), norm(), norm2(), normalize_p(), function_minimizer::normalize_posterior_distribution(), normalized_gauss_hermite(), old_inv_cumd_beta_stable(), posfun(), function_minimizer::prof_minimize(), function_minimizer::prof_minimize_re(), robust_regression(), function_minimizer::rwm_mcmc_routine(), set_derivatives(), df1b2_init_bounded_dev_vector::set_value(), sqrt(), and square().
Return dvector results of squaring elements in a values; constant vector object.
values | of constant object to be squared. |
Definition at line 28 of file d3arr4.cpp.
Return dvector results of squaring elements in a values; constant vector object.
values | of constant object to be squared. |
Definition at line 54 of file d3arr4.cpp.
Square of a elements in a matrix; constant matrix object.
m | matrix of numbers to be squared. |
Definition at line 69 of file d3arr4.cpp.
Square of elements in a 3-dimensional array; constant 3-dimensionsal array.
m | d3_array of numbers to be squared. |
Definition at line 84 of file d3arr4.cpp.
char which_library | ( | ) |
Get ADMB library mode.
Definition at line 15 of file libtype.cpp.
Referenced by banner().
Generated on Wed Sep 7 2022 00:01:32 for ADMB Documentation by 1.8.5 |