Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
operator_plus_equal.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_CORE_OPERATOR_PLUS_EQUAL_HPP
2
#define STAN_MATH_REV_CORE_OPERATOR_PLUS_EQUAL_HPP
3
4
#include <
stan/math/prim/meta.hpp
>
5
#include <
stan/math/rev/core/var.hpp
>
6
#include <
stan/math/rev/core/operator_addition.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_ = (*
this
+ 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 == 0.0) {
22
return
*
this
;
23
}
24
vi_ = (*
this
+ b).vi_;
25
return
*
this
;
26
}
27
28
}
// namespace math
29
}
// namespace stan
30
#endif
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_addition.hpp
var.hpp
stan
math
rev
core
operator_plus_equal.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.