| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
operator_multiply_equal.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_OPERATOR_MULTIPLY_EQUAL_HPP
2 #define STAN_MATH_REV_CORE_OPERATOR_MULTIPLY_EQUAL_HPP
3
4 #include <stan/math/rev/core/var.hpp>
5 #include <stan/math/rev/core/operator_multiplication.hpp>
6
7 namespace stan {
8 namespace math {
9
10 inline var& var::operator*=(const var& b) {
11 vi_ = new multiply_vv_vari(vi_, b.vi_);
12 return *this;
13 }
14
15 inline var& var::operator*=(const double b) {
16 if (b == 1.0)
17 return *this;
18 vi_ = new multiply_vd_vari(vi_, b);
19 return *this;
20 }
21
22 }
23 }
24 #endif
stan::math::var::operator*=
var & operator*=(const var &b)
The compound multiply/assignment operator for variables (C++).
Definition: operator_multiply_equal.hpp:10
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:32
stan::math::var::vi_
vari * vi_
Pointer to the implementation of this variable.
Definition: var.hpp:44
operator_multiplication.hpp
var.hpp

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