Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
operator_minus_equal.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_CORE_OPERATOR_MINUS_EQUAL_HPP
2
#define STAN_MATH_REV_CORE_OPERATOR_MINUS_EQUAL_HPP
3
4
#include <
stan/math/rev/core/var.hpp
>
5
#include <
stan/math/rev/core/operator_subtraction.hpp
>
6
#include <
stan/math/prim/meta.hpp
>
7
#include <
stan/math/prim/fun/size.hpp
>
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
(
unlikely
(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
unlikely
#define unlikely(x)
Definition
compiler_attributes.hpp:31
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
size.hpp
meta.hpp
operator_subtraction.hpp
var.hpp
stan
math
rev
core
operator_minus_equal.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.