From d982012ae902e07e6a3e0cab45bf88f38d5bf3d9 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 11 Dec 2011 13:10:22 +0100 Subject: [PATCH] Refactored void statHistLogInit Started refactoring statHistEnumInit --- src/StatHist.cc | 15 ++++++++------- src/StatHist.h | 2 -- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/StatHist.cc b/src/StatHist.cc index 23b0846ebc..d1936eaea1 100644 --- a/src/StatHist.cc +++ b/src/StatHist.cc @@ -260,12 +260,6 @@ StatHist::logInit(int capacity, double min, double max) init(capacity, Math::Log, Math::Exp, min, max); } -void -statHistLogInit(StatHist * H, int capacity, double min, double max) -{ - H->logInit(capacity, min, max); -} - /* linear histogram for enums */ /* we want to be have [-1,last_enum+1] range to track out of range enums */ double @@ -274,12 +268,19 @@ Math::Null(double x) return x; } +void +StatHist::enumInit(int last_enum) +{ + init(last_enum + 3, Math::Null, Math::Null, (double) -1, (double) (last_enum + 1 + 1)); +} + void statHistEnumInit(StatHist * H, int last_enum) { - H->init(last_enum + 3, Math::Null, Math::Null, (double) -1, (double) (last_enum + 1 + 1)); + H->enumInit(last_enum); } + void statHistEnumDumper(StoreEntry * sentry, int idx, double val, double size, int count) { diff --git a/src/StatHist.h b/src/StatHist.h index 7438030b2c..dde020ab21 100644 --- a/src/StatHist.h +++ b/src/StatHist.h @@ -53,7 +53,6 @@ public: void enumInit(int last_enum); void intInit(int n); void init(int capacity, hbase_f * val_in, hbase_f * val_out, double min, double max); - double deltaPctile(const StatHist & B, double pctile); protected: int findBin(double v); int *bins; @@ -69,7 +68,6 @@ protected: void statHistCount(StatHist * H, double val); double statHistDeltaMedian(const StatHist & A, const StatHist & B); double statHistDeltaPctile(const StatHist & A, const StatHist & B, double pctile); -void statHistLogInit(StatHist * H, int capacity, double min, double max); void statHistEnumInit(StatHist * H, int last_enum); void statHistIntInit(StatHist * H, int n); StatHistBinDumper statHistEnumDumper; -- 2.47.3