00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "RdbStatsPercentilesAve.h"
00028
00029
00030 RdbStatsPercentilesAve::RdbStatsPercentilesAve( RDB& irdbtable,
00031 const string& name,
00032 const string& percent_list,
00033 bool implicitquartile )
00034 throw( Exception ) try : RdbStatsPercentiles( irdbtable, name,
00035 percent_list,
00036 implicitquartile ) {
00037
00038 try {
00039
00040 #ifdef TRACEFCT
00041 TraceFct tf( "RdbStatsPercentilesAve::RdbStatsPercentilesAve( RDB&, "
00042 "const string&, const string& ) throw( Exception )" );
00043 #endif
00044
00045 } catch ( Exception& E ) {
00046
00047 throw;
00048
00049 } catch ( exception& e ) {
00050
00051 throw Exception( e.what( ) );
00052
00053 }
00054
00055 } catch ( Exception& E ) {
00056
00057
00058 throw;
00059
00060 } catch ( exception& e ) {
00061
00062
00063 throw Exception( e.what( ) );
00064
00065 }
00066
00067
00068 RdbStatsPercentilesAve::RdbStatsPercentilesAve( RDB& irdbtable,
00069 const string& name )
00070 throw( Exception ) try : RdbStatsPercentiles( irdbtable, name ) {
00071
00072 try {
00073
00074 #ifdef TRACEFCT
00075 TraceFct tf( "RdbStatsPercentilesAve::RdbStatsPercentilesAve( RDB&, "
00076 "const string&, const string& ) throw( Exception )" );
00077 #endif
00078
00079 } catch ( Exception& E ) {
00080
00081 throw;
00082
00083 } catch ( exception& e ) {
00084
00085 throw Exception( e.what( ) );
00086
00087 }
00088
00089 } catch ( Exception& E ) {
00090
00091
00092 throw;
00093
00094 } catch ( exception& e ) {
00095
00096
00097 throw Exception( e.what( ) );
00098
00099 }
00100
00101 int RdbStatsPercentilesAve::calculate_statistics( ) throw( ) {
00102
00103 #ifdef TRACEFCT
00104 TraceFct tf( "double RdbStatsPercentilesAve::calculate_statistics( ) "
00105 "throw( )" );
00106 #endif
00107
00108
00109 if ( 0 == this->RdbStatsPercentiles::calculate_statistics( ) )
00110 return 0;
00111
00112
00113 double norm_factor = get_absolute_average( );
00114 normalize_results( norm_factor );
00115
00116 return num_n;
00117
00118 }