1 #ifndef __JTOOLS__JQUANTILE__
2 #define __JTOOLS__JQUANTILE__
21 namespace JPP {
using namespace JTOOLS; }
45 const int option = 0) :
64 min = +std::numeric_limits<double>::max();
65 max = -std::numeric_limits<double>::max();
77 void put(
const double x,
const double w = 1.0)
87 buffer.insert(std::make_pair(x,w));
179 return std::max(fabs(
max), fabs(
min));
202 double getQuantile(
const double Q,
const bool reverse =
false)
const
218 throw JNoValue(
"JQuantile::getQuantile()");
228 std::ostream&
print(std::ostream& out,
bool lpr =
true)
const
235 out << setw(nc) << left <<
" " <<
' '
236 << setw(10) << left <<
" mean" <<
' '
237 << setw(10) << left <<
" STD" <<
' '
238 << setw(10) << left <<
" deviation" << endl;
241 out << setw(nc) << left <<
getTitle() <<
' '
287 for (T i = __begin; i != __end; ++i) {
296 throw JNoValue(
"JQuantile::getQuantile()");
const std::string & getTitle() const
Get title.
bool getLongprint(std::ostream &out)
Get long print option.
Exception for missing value.
I/O formatting auxiliaries.
Auxiliary class for title.
Exception for division by zero.
Auxiliary data structure for floating point format specification.