Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
precomp_vvv_vari.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_CORE_PRECOMP_VVV_VARI_HPP
2
#define STAN_MATH_REV_CORE_PRECOMP_VVV_VARI_HPP
3
4
#include <
stan/math/rev/core/vari.hpp
>
5
#include <
stan/math/rev/core/vvv_vari.hpp
>
6
7
namespace
stan
{
8
namespace
math {
9
10
// use for single precomputed partials
11
class
precomp_vvv_vari
final :
public
op_vvv_vari
{
12
protected
:
13
double
da_
;
14
double
db_
;
15
double
dc_
;
16
17
public
:
18
precomp_vvv_vari
(
double
val,
vari
* avi,
vari
* bvi,
vari
* cvi,
double
da,
19
double
db,
double
dc)
20
:
op_vvv_vari
(val, avi, bvi, cvi),
da_
(da),
db_
(db),
dc_
(dc) {}
21
void
chain
() {
22
avi_
->adj_ += adj_ *
da_
;
23
bvi_
->adj_ += adj_ *
db_
;
24
cvi_
->adj_ += adj_ *
dc_
;
25
}
26
};
27
28
}
// namespace math
29
}
// namespace stan
30
#endif
stan::math::op_vvv_vari::avi_
vari * avi_
Definition
vvv_vari.hpp:11
stan::math::op_vvv_vari::bvi_
vari * bvi_
Definition
vvv_vari.hpp:12
stan::math::op_vvv_vari::cvi_
vari * cvi_
Definition
vvv_vari.hpp:13
stan::math::op_vvv_vari
Definition
vvv_vari.hpp:9
stan::math::precomp_vvv_vari::chain
void chain()
Definition
precomp_vvv_vari.hpp:21
stan::math::precomp_vvv_vari::precomp_vvv_vari
precomp_vvv_vari(double val, vari *avi, vari *bvi, vari *cvi, double da, double db, double dc)
Definition
precomp_vvv_vari.hpp:18
stan::math::precomp_vvv_vari::da_
double da_
Definition
precomp_vvv_vari.hpp:13
stan::math::precomp_vvv_vari::dc_
double dc_
Definition
precomp_vvv_vari.hpp:15
stan::math::precomp_vvv_vari::db_
double db_
Definition
precomp_vvv_vari.hpp:14
stan::math::precomp_vvv_vari
Definition
precomp_vvv_vari.hpp:11
stan::math::vari_value
Definition
vari.hpp:17
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
vari.hpp
vvv_vari.hpp
stan
math
rev
core
precomp_vvv_vari.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.