Stan Math Library  2.10.0
reverse mode automatic differentiation
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 
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
fvar< T > logit(const fvar< T > &x)
Definition: logit.hpp:17
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

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