10 #ifndef ROL_CAUCHY_HPP
11 #define ROL_CAUCHY_HPP
14 #include "ROL_ParameterList.hpp"
25 Cauchy(
const Real loc = 0.,
const Real scale = 1.)
26 :
loc_(loc),
scale_((scale>0.) ? scale : 1.) {}
28 Cauchy(ROL::ParameterList &parlist) {
29 loc_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Cauchy").get(
"Location",0.);
30 scale_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Cauchy").get(
"Scale",1.);
52 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
53 ">>> ERROR (ROL::Cauchy): Cauchy moments are undefined!");
57 return ROL_NINF<Real>();
61 return ROL_INF<Real>();
64 void test(std::ostream &outStream = std::cout )
const {
66 std::vector<Real> X(size,4.*(Real)rand()/(Real)RAND_MAX - 2.);
67 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