Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
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
#include <
stan/math/prim/meta.hpp
>
7
8
namespace
stan
{
9
namespace
math {
10
11
template
<
typename
T>
12
inline
var_value<T>
&
var_value<T, require_floating_point_t<T>
>::operator*=(
13
const
var_value<T>
& b) {
14
vi_ =
new
internal::multiply_vv_vari
(vi_, b.vi_);
15
return
*
this
;
16
}
17
18
template
<
typename
T>
19
inline
var_value<T>
&
var_value<T, require_floating_point_t<T>
>::operator*=(
20
T b) {
21
if
(b == 1.0) {
22
return
*
this
;
23
}
24
vi_ =
new
internal::multiply_vd_vari
(vi_, b);
25
return
*
this
;
26
}
27
28
}
// namespace math
29
}
// namespace stan
30
#endif
stan::math::internal::multiply_vd_vari
Definition
operator_multiplication.hpp:32
stan::math::internal::multiply_vv_vari
Definition
operator_multiplication.hpp:22
stan::math::var_value
Definition
var_value_fwd_declare.hpp:8
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
meta.hpp
operator_multiplication.hpp
var.hpp
stan
math
rev
core
operator_multiply_equal.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.