44 #ifndef ROL_LOGISTIC_HPP
45 #define ROL_LOGISTIC_HPP
48 #include "ROL_ParameterList.hpp"
59 Logistic(
const Real mean = 0.,
const Real var = 1.)
60 :
mean_(mean),
var_((var>0.) ? var : 1.) {}
63 mean_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Logistic").get(
"Mean",0.);
64 var_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Logistic").get(
"Scale",1.);
70 return val/(
var_*std::pow(1.0+val,2.0));
80 return (input-
mean_) +
var_*std::log(1.0+val);
84 return mean_ +
var_*std::log(input/(1.0-input));
90 case 1: val =
mean_;
break;
93 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
94 ">>> ERROR (ROL::Logistic): Logistic moment not implemented for m > 2!");
100 return ROL_NINF<Real>();
104 return ROL_INF<Real>();
107 void test(std::ostream &outStream = std::cout )
const {
109 std::vector<Real> X(size,4.*(Real)rand()/(Real)RAND_MAX - 2.);
110 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