10 #ifndef ROL_PROBABILITYINFO_HPP
11 #define ROL_PROBABILITYINFO_HPP
13 #include "ROL_ParameterList.hpp"
20 int &nStatistic, std::vector<Real> &lower,
21 std::vector<Real> &upper,
bool &isBoundActivated,
22 const bool printToStream =
false,
23 std::ostream &outStream = std::cout) {
24 name = parlist.sublist(
"SOL").sublist(
"Probability").get<std::string>(
"Name");
26 lower.clear(); upper.clear();
27 nStatistic = 0; isBoundActivated =
false;
28 if ( name ==
"bPOE" ) {
30 isBoundActivated =
true;
31 lower.resize(nStatistic,zero);
32 upper.resize(nStatistic,ROL_INF<Real>());
34 else if ( name ==
"Smoothed POE" ) {
38 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
39 ">>> (ROL::ProbabilityInfo): Invalid probability " << name <<
"!");
43 if ( printToStream ) {
45 oldFormatState.copyfmt(outStream);
47 outStream << std::endl;
48 outStream << std::scientific << std::setprecision(6);
49 outStream << std::setfill(
'-') << std::setw(80) <<
"-" << std::endl;
50 outStream <<
" PROBABILITY INFORMATION" << std::endl;
51 outStream << std::setfill(
'-') << std::setw(80) <<
"-" << std::endl;
52 outStream <<
" NAME" << std::endl;
53 outStream <<
" " << name << std::endl;
54 outStream <<
" NUMBER OF STATISTICS" << std::endl;
55 outStream <<
" " << nStatistic << std::endl;
56 outStream <<
" ARE BOUNDS ACTIVATED" << std::endl;
57 outStream <<
" " << (isBoundActivated ?
"TRUE" :
"FALSE") << std::endl;
58 if ( isBoundActivated ) {
59 outStream <<
" STATISTIC LOWER BOUNDS" << std::endl;
60 for (
int i = 0; i < nStatistic-1; ++i) {
61 outStream <<
" " << lower[i] << std::endl;
63 outStream <<
" " << lower[nStatistic-1] << std::endl;
64 outStream <<
" STATISTIC UPPER BOUNDS" << std::endl;
65 for (
int i = 0; i < nStatistic-1; ++i) {
66 outStream <<
" " << upper[i] << std::endl;
68 outStream <<
" " << upper[nStatistic-1] << std::endl;
70 outStream << std::setfill(
'-') << std::setw(80) <<
"-" << std::endl;
71 outStream << std::endl;
73 outStream.copyfmt(oldFormatState);
Contains definitions of custom data types in ROL.
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
basic_nullstream< char, std::char_traits< char >> nullstream
void ProbabilityInfo(ROL::ParameterList &parlist, std::string &name, int &nStatistic, std::vector< Real > &lower, std::vector< Real > &upper, bool &isBoundActivated, const bool printToStream=false, std::ostream &outStream=std::cout)