Stan Math Library
5.0.0
Automatic Differentiation
Loading...
Searching...
No Matches
modified_bessel_second_kind.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
2
#define STAN_MATH_REV_FUN_MODIFIED_BESSEL_SECOND_KIND_HPP
3
4
#include <
stan/math/rev/meta.hpp
>
5
#include <
stan/math/rev/core.hpp
>
6
#include <
stan/math/prim/fun/modified_bessel_second_kind.hpp
>
7
8
namespace
stan
{
9
namespace
math {
10
11
namespace
internal {
12
13
class
modified_bessel_second_kind_dv_vari
:
public
op_dv_vari
{
14
public
:
15
modified_bessel_second_kind_dv_vari
(
int
a,
vari
* bvi)
16
:
op_dv_vari
(
modified_bessel_second_kind
(a, bvi->val_), a, bvi) {}
17
void
chain
() {
18
bvi_
->adj_
19
-= adj_
20
* (
ad_
*
modified_bessel_second_kind
(
ad_
,
bvi_
->val_) /
bvi_
->val_
21
+
modified_bessel_second_kind
(
ad_
- 1,
bvi_
->val_));
22
}
23
};
24
}
// namespace internal
25
26
inline
var
modified_bessel_second_kind
(
int
v,
const
var
& a) {
27
return
var
(
new
internal::modified_bessel_second_kind_dv_vari
(v, a.vi_));
28
}
29
30
}
// namespace math
31
}
// namespace stan
32
#endif
stan::math::internal::modified_bessel_second_kind_dv_vari::chain
void chain()
Definition
modified_bessel_second_kind.hpp:17
stan::math::internal::modified_bessel_second_kind_dv_vari::modified_bessel_second_kind_dv_vari
modified_bessel_second_kind_dv_vari(int a, vari *bvi)
Definition
modified_bessel_second_kind.hpp:15
stan::math::internal::modified_bessel_second_kind_dv_vari
Definition
modified_bessel_second_kind.hpp:13
stan::math::op_dv_vari::bvi_
vari * bvi_
Definition
dv_vari.hpp:12
stan::math::op_dv_vari::ad_
double ad_
Definition
dv_vari.hpp:11
stan::math::op_dv_vari
Definition
dv_vari.hpp:9
stan::math::var_value< double >
stan::math::vari_value
Definition
vari.hpp:17
stan::math::modified_bessel_second_kind
fvar< T > modified_bessel_second_kind(int v, const fvar< T > &z)
Definition
modified_bessel_second_kind.hpp:12
stan::math::var
var_value< double > var
Definition
var.hpp:1187
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
modified_bessel_second_kind.hpp
core.hpp
meta.hpp
stan
math
rev
fun
modified_bessel_second_kind.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.