| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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/scal/err/check_bounded.hpp>
5 #include <stan/math/prim/scal/fun/logit.hpp>
6
7 namespace stan {
8 namespace math {
9
24 template <typename T>
25 inline
26 T prob_free(const T y) {
27 check_bounded<T, double, double>
28 ("prob_free", "Probability variable",
29 y, 0, 1);
30 return logit(y);
31 }
32
33 }
34 }
35 #endif
stan
Definition: log_sum_exp.hpp:8
check_bounded.hpp
stan::math::logit
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:16
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:26
logit.hpp

[ Stan Home Page ] © 2011–2016, Stan Development Team.