Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
operator_minus_equal.hpp
Go to the documentation of this file.
1 #ifndef STAN__AGRAD__REV__OPERATORS__OPERATOR_MINUS_EQUAL_HPP
2 #define STAN__AGRAD__REV__OPERATORS__OPERATOR_MINUS_EQUAL_HPP
3 
4 #include <stan/agrad/rev/var.hpp>
6 
7 namespace stan {
8  namespace agrad {
9 
10  inline var& var::operator-=(const var& b) {
11  vi_ = new subtract_vv_vari(vi_,b.vi_);
12  return *this;
13  }
14 
15  inline var& var::operator-=(const double b) {
16  if (b == 0.0)
17  return *this;
18  vi_ = new subtract_vd_vari(vi_,b);
19  return *this;
20  }
21 
22  }
23 }
24 #endif
var & operator-=(const var &b)
The compound subtract/assignment operator for variables (C++).
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:40
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:27

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