// file: $isip_ifc/class/stat/Histogram/hist_00.cc // version: $Id: hist_00.cc 10393 2006-01-25 05:20:55Z srinivas $ // // isip include files // #include "Histogram.h" // method: clear // // arguments: // Integral::CMODE cmode: (input) clear mode // // return: a bool8 value indicating status // // clear the internal data // bool8 Histogram::clear(Integral::CMODE cmode_a) { // reset the mode if necessary // if (cmode_a != Integral::RETAIN) { scale_d = DEF_SCALE; mode_d = DEF_MODE; } // clear the bins and counts // return (bins_d.clear(cmode_a) && counts_d.clear(cmode_a) && dim_d.clear(cmode_a) && min_d.clear(cmode_a) && max_d.clear(cmode_a) && num_bins_d.clear(cmode_a)); } //----------------------------------------------------------------------------- // // we define non-integral constants in the default constructor // //----------------------------------------------------------------------------- // constants: required constants such as the class name // const String Histogram::CLASS_NAME(L"Histogram"); // constants: i/o related constants // const String Histogram::DEF_PARAM(L""); const String Histogram::PARAM_SCALE(L"scale"); const String Histogram::PARAM_MODE(L"mode"); const String Histogram::PARAM_DIM(L"dim"); const String Histogram::PARAM_BINS(L"bins"); const String Histogram::PARAM_COUNTS(L"counts"); const String Histogram::PARAM_MIN(L"min"); const String Histogram::PARAM_MAX(L"max"); const String Histogram::PARAM_NUM_BINS(L"num_bins"); // static instantiations: memory manager and a permanent scratch space // Integral::DEBUG Histogram::debug_level_d = Integral::NONE; MemoryManager Histogram::mgr_d(sizeof(Histogram), Histogram::CLASS_NAME); const NameMap Histogram::SCALE_MAP(L"LINEAR, LOG, USER_DEFINED"); const NameMap Histogram::MODE_MAP(L"CENTERS, EDGES");