Public Member Functions | |
void | finishUpdates (double PROB_THRESH=0.05) |
You need to call this function after calling a bunch of update(). | |
size_t | col () const |
double | getMean () const |
int | getMin () const |
int | getMax () const |
double | getSigma () const |
const std::string & | getName () const |
int | getRangeMin () const |
int | getRangeMax () const |
int | getTornadoMin () const |
int | getTornadoMax () const |
ColumnDescr (size_t col_in, const std::string &name, int MIN, int MAX, std::string tornado_rule="") | |
The column number is 0,1,2 . | |
ColumnDescr (size_t col, const std::string &name, int rangeMIN, int rangeMAX, double sigma_in, double mean_in, int N, int min_in, int max_in, int tornmin_in, int tornmax_in, const std::string &tornado_rule) | |
Helper function to create ColumnDescr from XML data. | |
const std::string & | update (const std::string &v, const std::set< int > &missing_numbers, bool is_tornado) |
Checks that the value is within bounds and is not missing, and returns the appropriate value. | |
Static Public Member Functions | |
static bool | myrsort (int a, int b) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ColumnDescr &obj) |
ColumnDescr::ColumnDescr | ( | size_t | col_in, | |
const std::string & | name, | |||
int | MIN, | |||
int | MAX, | |||
std::string | tornado_rule = "" | |||
) | [inline] |
The column number is 0,1,2 .
.. Provide the name of this column, along with a range-minimum and range-maximum. If a tornado rule is passed in, the range min/max are used to decide the thresholds (the rule decides the direction). If the name is empty, a generic name e.g: col3 is used.
ColumnDescr::ColumnDescr | ( | size_t | col, | |
const std::string & | name, | |||
int | rangeMIN, | |||
int | rangeMAX, | |||
double | sigma_in, | |||
double | mean_in, | |||
int | N, | |||
int | min_in, | |||
int | max_in, | |||
int | tornmin_in, | |||
int | tornmax_in, | |||
const std::string & | tornado_rule | |||
) | [inline] |
Helper function to create ColumnDescr from XML data.
size_t ColumnDescr::col | ( | ) | const [inline] |
void ColumnDescr::finishUpdates | ( | double | PROB_THRESH = 0.05 |
) | [inline] |
You need to call this function after calling a bunch of update().
Call this function with PROB_THRESH -ve if you don't want tornmin and tornmax to be set here.
int ColumnDescr::getMax | ( | ) | const [inline] |
double ColumnDescr::getMean | ( | ) | const [inline] |
int ColumnDescr::getMin | ( | ) | const [inline] |
const std::string& ColumnDescr::getName | ( | ) | const [inline] |
int ColumnDescr::getRangeMax | ( | ) | const [inline] |
int ColumnDescr::getRangeMin | ( | ) | const [inline] |
double ColumnDescr::getSigma | ( | ) | const [inline] |
int ColumnDescr::getTornadoMax | ( | ) | const [inline] |
int ColumnDescr::getTornadoMin | ( | ) | const [inline] |
static bool ColumnDescr::myrsort | ( | int | a, | |
int | b | |||
) | [inline, static] |
const std::string& ColumnDescr::update | ( | const std::string & | v, | |
const std::set< int > & | missing_numbers, | |||
bool | is_tornado | |||
) | [inline] |
Checks that the value is within bounds and is not missing, and returns the appropriate value.
It also updates local statistics if needed. WARNING! update all at once. don't print in the middle, and remember to call finishUpdates() after you are done.
std::ostream& operator<< | ( | std::ostream & | os, | |
const ColumnDescr & | obj | |||
) | [friend] |