Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
rev
scal
fun
log_inv_logit.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_SCAL_FUN_LOG_INV_LOGIT_HPP
2
#define STAN_MATH_REV_SCAL_FUN_LOG_INV_LOGIT_HPP
3
4
#include <
stan/math/rev/meta.hpp
>
5
#include <
stan/math/prim/scal/fun/inv_logit.hpp
>
6
#include <
stan/math/prim/scal/fun/log_inv_logit.hpp
>
7
#include <
stan/math/rev/core.hpp
>
8
#include <
stan/math/rev/core/precomp_v_vari.hpp
>
9
10
namespace
stan
{
11
namespace
math {
12
20
inline
var
log_inv_logit
(
const
var
& u) {
21
return
var
(
22
new
precomp_v_vari
(
log_inv_logit
(u.
val
()), u.
vi_
,
inv_logit
(-u.
val
())));
23
}
24
25
}
// namespace math
26
}
// namespace stan
27
#endif
precomp_v_vari.hpp
core.hpp
stan
Definition:
log_sum_exp.hpp:8
stan::math::inv_logit
fvar< T > inv_logit(const fvar< T > &x)
Returns the inverse logit function applied to the argument.
Definition:
inv_logit.hpp:20
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition:
var.hpp:33
log_inv_logit.hpp
stan::math::var::vi_
vari * vi_
Pointer to the implementation of this variable.
Definition:
var.hpp:45
stan::math::precomp_v_vari
Definition:
precomp_v_vari.hpp:11
inv_logit.hpp
stan::math::log_inv_logit
fvar< T > log_inv_logit(const fvar< T > &x)
Definition:
log_inv_logit.hpp:12
stan::math::var::val
double val() const
Return the value of this variable.
Definition:
var.hpp:294
meta.hpp
[
Stan Home Page
]
© 2011–2018, Stan Development Team.