Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
scal
fun
prob_free.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_SCAL_FUN_PROB_FREE_HPP
2
#define STAN_MATH_PRIM_SCAL_FUN_PROB_FREE_HPP
3
4
#include <
stan/math/prim/meta.hpp
>
5
#include <
stan/math/prim/scal/err/check_bounded.hpp
>
6
#include <
stan/math/prim/scal/fun/logit.hpp
>
7
8
namespace
stan
{
9
namespace
math {
10
26
template
<
typename
T>
27
inline
T
prob_free
(
const
T& y) {
28
check_bounded<T, double, double>(
"prob_free"
,
"Probability variable"
, y, 0,
29
1);
30
return
logit
(y);
31
}
32
33
}
// namespace math
34
}
// namespace stan
35
#endif
stan
Definition:
log_sum_exp.hpp:8
meta.hpp
stan::math::prob_free
T prob_free(const T &y)
Return the free scalar that when transformed to a probability produces the specified scalar...
Definition:
prob_free.hpp:27
check_bounded.hpp
stan::math::logit
fvar< T > logit(const fvar< T > &x)
Definition:
logit.hpp:14
logit.hpp
[
Stan Home Page
]
© 2011–2018, Stan Development Team.