ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
Functions
RETURN_ARRAY_INCREMENT and RETURN_ARRAY_DECREMENT

Functions

void RETURN_ARRAYS_DECREMENT (void)
 Decrements gradient_structure::RETURN_ARRAYS_PTR.
void RETURN_ARRAYS_INCREMENT (void)
 Increments gradient_structure::RETURN_ARRAYS_PTR.

Detailed Description

These functions must be called in any function that returns a "variable" object, ie dvariable, dvar_vector, ... Failure to do so may generate an error message related to an overflow in the RETURN_ARRAYS stack, or even worse cause derivatives to be incorrect.


Function Documentation

void RETURN_ARRAYS_DECREMENT ( void  )

Decrements gradient_structure::RETURN_ARRAYS_PTR.

Must be called prior to exit from any functiton that returns a variable object. Calls must balance calls to void RETURN_ARRAYS_INCREMENT(void).

Definition at line 558 of file gradstrc.cpp.

Referenced by acos(), ageLengthKey(), ALK(), asin(), bicubic_spline(), cmvbvu_(), cmvphi_(), dvar_matrix::colfill(), dvar_matrix::colfill_randn(), dvar_matrix::colfill_randu(), dvar_matrix::colfill_seqadd(), cos(), cosh(), cubic_spline(), cumbvn(), dbinom(), dlnorm(), dmultinom(), dmvlogistic(), dnbinom(), dnbinom_tau(), dnorm(), dpois(), dstudent_t(), dzinbinom(), elem_div(), elem_prod(), exp(), expm(), extract_diagonal(), fabs(), factln(), dvar_vector::fill_randbi(), dvar_vector::fill_randn(), dvar_matrix::fill_randn(), dvar_vector::fill_randu(), dvar_matrix::fill_randu(), dvar_vector::fill_seqadd(), first_difference(), gammln(), generalized_Ricker1(), generalized_Ricker2(), ghk(), ghk_choleski(), ghk_choleski_m(), ghk_choleski_m_cauchy(), ghk_choleski_m_logistic(), ghk_m(), Gompertz(), Hassell(), Hill(), HollingII(), HollingIII(), HollingIV(), inv_cumd_norm_inner(), ln_det(), log(), log10(), log_comb(), log_negbinomial_density(), logistic(), logistic3(), logisticK(), mean(), mfexp(), Michaelis_Menten1(), Michaelis_Menten2(), monomolecular(), mvbvu_(), mvphi_(), negbinomial_density(), nllBeta(), nllBinomial(), nllDirichlet(), nllGamma(), nllInverseGamma(), nllLognormal(), nllLognormal2(), nllMultiNomial(), nllNegativeBinomial(), nllNormal(), nllNormal2(), nllPoisson(), nonrectangular_hyperbola(), norm(), norm2(), old_cumd_norm(), operator*(), dvar_matrix::operator*=(), operator+(), dvar_vector::operator-(), operator-(), operator/(), dvar_vector::operator/=(), dvar_matrix::operator/=(), dvar3_array::operator/=(), dvar4_array::operator/=(), dvar5_array::operator/=(), dvar6_array::operator/=(), dvar7_array::operator/=(), operator<<(), dvar_matrix::operator=(), outer_prod(), pow(), Ricker(), robust_regression(), dvar_matrix::rowfill(), dvar_matrix::rowfill_randn(), dvar_matrix::rowfill_randu(), dvar_matrix::rowfill_seqadd(), sfabs(), Shepherd(), sin(), sinh(), solve(), splie2(), splin2(), splint(), sqr(), sqrt(), std_dev(), sum(), tan(), tanh(), theta_logistic(), value(), var(), and varchol().

void RETURN_ARRAYS_INCREMENT ( void  )

Increments gradient_structure::RETURN_ARRAYS_PTR.

Must be called on entry to any function that returns a variable object. Calls must balance calls to void RETURN_ARRAYS_DECREMENT(void).

Definition at line 526 of file gradstrc.cpp.

Referenced by acos(), ageLengthKey(), ALK(), asin(), bicubic_spline(), cmvbvu_(), cmvphi_(), dvar_matrix::colfill(), dvar_matrix::colfill_randn(), dvar_matrix::colfill_randu(), dvar_matrix::colfill_seqadd(), cos(), cosh(), cubic_spline(), cumbvn(), dbinom(), dlnorm(), dmultinom(), dmvlogistic(), dnbinom(), dnbinom_tau(), dnorm(), dpois(), dstudent_t(), dzinbinom(), elem_div(), elem_prod(), exp(), expm(), extract_diagonal(), fabs(), factln(), dvar_vector::fill_randbi(), dvar_vector::fill_randn(), dvar_matrix::fill_randn(), dvar_vector::fill_randu(), dvar_matrix::fill_randu(), dvar_vector::fill_seqadd(), first_difference(), gammln(), generalized_Ricker1(), generalized_Ricker2(), ghk(), ghk_choleski(), ghk_choleski_m(), ghk_choleski_m_cauchy(), ghk_choleski_m_logistic(), ghk_m(), Gompertz(), Hassell(), Hill(), HollingII(), HollingIII(), HollingIV(), inv_cumd_norm_inner(), ln_det(), log(), log10(), log_comb(), log_negbinomial_density(), logistic(), logistic3(), logisticK(), mean(), mfexp(), Michaelis_Menten1(), Michaelis_Menten2(), monomolecular(), mvbvu_(), mvphi_(), negbinomial_density(), nllBeta(), nllBinomial(), nllDirichlet(), nllGamma(), nllInverseGamma(), nllLognormal(), nllLognormal2(), nllMultiNomial(), nllNegativeBinomial(), nllNormal(), nllNormal2(), nllPoisson(), nonrectangular_hyperbola(), norm(), norm2(), old_cumd_norm(), operator*(), dvar_matrix::operator*=(), operator+(), dvar_vector::operator-(), operator-(), operator/(), dvar_vector::operator/=(), dvar_matrix::operator/=(), dvar3_array::operator/=(), dvar4_array::operator/=(), dvar5_array::operator/=(), dvar6_array::operator/=(), dvar7_array::operator/=(), operator<<(), dvar_matrix::operator=(), outer_prod(), pow(), Ricker(), robust_regression(), dvar_matrix::rowfill(), dvar_matrix::rowfill_randn(), dvar_matrix::rowfill_randu(), dvar_matrix::rowfill_seqadd(), sfabs(), Shepherd(), sin(), sinh(), solve(), splie2(), splin2(), splint(), sqr(), sqrt(), std_dev(), sum(), tan(), tanh(), theta_logistic(), value(), var(), and varchol().