Stan Math Library
2.14.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/prim/scal/fun/inv_logit.hpp
>
5
#include <
stan/math/prim/scal/fun/log_inv_logit.hpp
>
6
#include <
stan/math/rev/core.hpp
>
7
#include <
stan/math/rev/core/precomp_v_vari.hpp
>
8
9
namespace
stan
{
10
namespace
math {
11
19
inline
var
log_inv_logit
(
const
var
& u) {
20
return
var
(
new
precomp_v_vari
(
log_inv_logit
(u.
val
()),
21
u.
vi_
,
inv_logit
(-u.
val
())));
22
}
23
24
}
25
}
26
#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:30
log_inv_logit.hpp
stan::math::var::vi_
vari * vi_
Pointer to the implementation of this variable.
Definition:
var.hpp:42
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:14
stan::math::var::val
double val() const
Return the value of this variable.
Definition:
var.hpp:230
[
Stan Home Page
]
© 2011–2016, Stan Development Team.