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