Stan Math Library
5.0.0
Automatic Differentiation
Loading...
Searching...
No Matches
operator_divide_equal.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_CORE_OPERATOR_DIVIDE_EQUAL_HPP
2
#define STAN_MATH_REV_CORE_OPERATOR_DIVIDE_EQUAL_HPP
3
4
#include <
stan/math/rev/core/var.hpp
>
5
#include <
stan/math/rev/core/operator_division.hpp
>
6
#include <
stan/math/prim/meta.hpp
>
7
8
namespace
stan
{
9
namespace
math {
10
template
<
typename
T>
11
inline
var_value<T>
&
var_value<T, require_floating_point_t<T>
>::operator/=(
12
const
var_value<T>
& b) {
13
vi_ =
divide
(*
this
, b).vi_;
14
return
*
this
;
15
}
16
17
template
<
typename
T>
18
inline
var_value<T>
&
var_value<T, require_floating_point_t<T>
>::operator/=(
19
T b) {
20
if
(b == 1.0) {
21
return
*
this
;
22
}
23
vi_ =
divide
(*
this
, b).vi_;
24
return
*
this
;
25
}
26
27
template
<
typename
T>
28
inline
var_value<T>
&
29
var_value<T, internal::require_matrix_var_value<T>
>::operator/=(
30
const
var_value<T>
& b) {
31
vi_ =
divide
(*
this
, b).vi_;
32
return
*
this
;
33
}
34
35
template
<
typename
T>
36
inline
var_value<T>
&
37
var_value<T, internal::require_matrix_var_value<T>
>::operator/=(T b) {
38
if
(b == 1.0) {
39
return
*
this
;
40
}
41
vi_ =
divide
(*
this
, b).vi_;
42
return
*
this
;
43
}
44
45
}
// namespace math
46
}
// namespace stan
47
#endif
stan::math::var_value
Definition
var_value_fwd_declare.hpp:8
stan::math::divide
auto divide(T_a &&a, double d)
Returns the elementwise division of the kernel generator expression.
Definition
divide.hpp:20
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_division.hpp
var.hpp
stan
math
rev
core
operator_divide_equal.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.