44 #ifndef ROL_CAUCHY_HPP
45 #define ROL_CAUCHY_HPP
48 #include "ROL_ParameterList.hpp"
59 Cauchy(
const Real loc = 0.,
const Real scale = 1.)
60 :
loc_(loc),
scale_((scale>0.) ? scale : 1.) {}
62 Cauchy(ROL::ParameterList &parlist) {
63 loc_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Cauchy").get(
"Location",0.);
64 scale_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Cauchy").get(
"Scale",1.);
86 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
87 ">>> ERROR (ROL::Cauchy): Cauchy moments are undefined!");
92 return ROL_NINF<Real>();
96 return ROL_INF<Real>();
99 void test(std::ostream &outStream = std::cout )
const {
101 std::vector<Real> X(size,4.*(Real)rand()/(Real)RAND_MAX - 2.);
102 std::vector<int> T(size,0);
Cauchy(const Real loc=0., const Real scale=1.)
Real evaluatePDF(const Real input) const
Real lowerBound(void) const
Cauchy(ROL::ParameterList &parlist)
Real integrateCDF(const Real input) const
static constexpr Real pi() noexcept
Real upperBound(void) const
Real invertCDF(const Real input) const
virtual void test(std::ostream &outStream=std::cout) const
Real evaluateCDF(const Real input) const
void test(std::ostream &outStream=std::cout) const
Real moment(const size_t m) const