1 #ifndef STAN_MATH_REV_CORE_OPERATOR_UNARY_DECREMENT_HPP
2 #define STAN_MATH_REV_CORE_OPERATOR_UNARY_DECREMENT_HPP
6 #include <boost/math/special_functions/fpclassify.hpp>
13 class decrement_vari :
public op_v_vari {
15 explicit decrement_vari(vari* avi) :
16 op_v_vari(avi->val_ - 1.0, avi) {
20 avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
41 a.
vi_ =
new decrement_vari(a.
vi_);
58 a.
vi_ =
new decrement_vari(a.
vi_);
Independent (input) and dependent (output) variables for gradients.
var & operator--(var &a)
Prefix decrement operator for variables (C++).
bool isnan(const stan::math::var &v)
Checks if the given number is NaN.
vari * vi_
Pointer to the implementation of this variable.