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