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 #include "RdbStatsPercentilesMed.h"
00027
00028
00029 RdbStatsPercentilesMed::RdbStatsPercentilesMed( RDB& irdbtable,
00030 const string& name,
00031 const string& percent_list,
00032 bool implicitquartile )
00033 throw( Exception ) try : RdbStatsPercentiles( irdbtable, name,
00034 percent_list,
00035 implicitquartile ) {
00036
00037 try {
00038
00039 #ifdef TRACEFCT
00040 TraceFct tf( "RdbStatsPercentilesMed::RdbStatsPercentilesMed( RDB&, "
00041 "const string&, const string& ) throw( Exception )" );
00042 #endif
00043
00044 } catch ( Exception& E ) {
00045
00046 throw;
00047
00048 } catch ( exception& e ) {
00049
00050 throw Exception( e.what( ) );
00051
00052 }
00053
00054 } catch ( Exception& E ) {
00055
00056
00057 throw;
00058
00059 } catch ( exception& e ) {
00060
00061
00062 throw Exception( e.what( ) );
00063
00064 }
00065
00066
00067 RdbStatsPercentilesMed::RdbStatsPercentilesMed( RDB& irdbtable,
00068 const string& name )
00069 throw( Exception ) try : RdbStatsPercentiles( irdbtable, name ) {
00070
00071 try {
00072
00073 #ifdef TRACEFCT
00074 TraceFct tf( "RdbStatsPercentilesMed::RdbStatsPercentilesMed( RDB&, "
00075 "const string&, const string& ) throw( Exception )" );
00076 #endif
00077
00078 } catch ( Exception& E ) {
00079
00080 throw;
00081
00082 } catch ( exception& e ) {
00083
00084 throw Exception( e.what( ) );
00085
00086 }
00087
00088 } catch ( Exception& E ) {
00089
00090
00091 throw;
00092
00093 } catch ( exception& e ) {
00094
00095
00096 throw Exception( e.what( ) );
00097
00098 }
00099
00100 int RdbStatsPercentilesMed::calculate_statistics( ) throw( ) {
00101
00102 #ifdef TRACEFCT
00103 TraceFct tf( "double RdbStatsPercentilesMed::calculate_statistics( ) "
00104 "throw( )" );
00105 #endif
00106
00107
00108 if ( 0 == this->RdbStatsPercentiles::calculate_statistics( ) )
00109 return 0;
00110
00111
00112 double norm_factor = fabs( the_median );
00113 normalize_results( norm_factor );
00114
00115 return num_n;
00116
00117 }