| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
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
9 namespace math {
10
25 template <typename T>
26 inline
27 T prob_free(const T y) {
28 using stan::math::logit;
29 stan::math::check_bounded<T, double, double>
30 ("stan::math::prob_free", "Probability variable",
31 y, 0, 1);
32 return logit(y);
33 }
34
35 }
36
37 }
38
39 #endif
check_bounded.hpp
stan::math::logit
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
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
logit.hpp

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