operator_minus_equal.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_REV_CORE_OPERATOR_MINUS_EQUAL_HPP
#define STAN_MATH_REV_CORE_OPERATOR_MINUS_EQUAL_HPP
#include <stan/math/rev/core/var.hpp>
#include <stan/math/rev/core/operator_subtraction.hpp>
namespace stan {
namespace math {
inline var& var::operator-=(const var& b) {
vi_ = new subtract_vv_vari(vi_, b.vi_);
return *this;
}
inline var& var::operator-=(double b) {
if (b == 0.0)
return *this;
vi_ = new subtract_vd_vari(vi_, b);
return *this;
}
}
}
#endif
stan
Definition: log_sum_exp.hpp:8
operator_subtraction.hpp
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:30
stan::math::var::operator-=
var & operator-=(const var &b)
The compound subtract/assignment operator for variables (C++).
Definition: operator_minus_equal.hpp:10
stan::math::var::vi_
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:42
var.hpp

[ Stan Home Page ] © 2011–2016, Stan Development Team.