10 #ifndef ROL_LOGISTIC_HPP
11 #define ROL_LOGISTIC_HPP
14 #include "ROL_ParameterList.hpp"
25 Logistic(
const Real mean = 0.,
const Real var = 1.)
26 :
mean_(mean),
var_((var>0.) ? var : 1.) {}
29 mean_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Logistic").get(
"Mean",0.);
30 var_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Logistic").get(
"Scale",1.);
36 return val/(
var_*std::pow(1.0+val,2.0));
46 return (input-
mean_) +
var_*std::log(1.0+val);
50 return mean_ +
var_*std::log(input/(1.0-input));
56 case 1: val =
mean_;
break;
59 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
60 ">>> ERROR (ROL::Logistic): Logistic moment not implemented for m > 2!");
66 return ROL_NINF<Real>();
70 return ROL_INF<Real>();
73 void test(std::ostream &outStream = std::cout )
const {
75 std::vector<Real> X(size,4.*(Real)rand()/(Real)RAND_MAX - 2.);
76 std::vector<int> T(size,0);
Logistic(ROL::ParameterList &parlist)
Real invertCDF(const Real input) const
Logistic(const Real mean=0., const Real var=1.)
Real lowerBound(void) const
void test(std::ostream &outStream=std::cout) const
Real evaluateCDF(const Real input) const
Real evaluatePDF(const Real input) const
virtual void test(std::ostream &outStream=std::cout) const
Real moment(const size_t m) const
Real upperBound(void) const
Real integrateCDF(const Real input) const