rdbstats  2.0.9
RdbStatsPercentilesAve.cc
1 // File: RdbStatsPercentilesAve.cc
2 
3 // --8<--8<--8<--8<--
4 //
5 // Copyright (C) 2006 Smithsonian Astrophysical Observatory
6 //
7 // This file is part of rdbstats
8 //
9 // rdbstats is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // rdbstats is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the
21 // Free Software Foundation, Inc.
22 // 51 Franklin Street, Fifth Floor
23 // Boston, MA 02110-1301, USA
24 //
25 // -->8-->8-->8-->8--
26 
27 #include "RdbStatsPercentilesAve.h"
28 
29 // The user specified percentiles. For example: --percentiles 12,34,45
30 RdbStatsPercentilesAve::RdbStatsPercentilesAve( RDB& irdbtable,
31  const std::string& name,
32  const PercentileList& percentiles )
33  : RdbStatsPercentiles( irdbtable, name, percentiles ) {}
34 
35 // --quartiles was entered at the command line.
36 RdbStatsPercentilesAve::RdbStatsPercentilesAve( RDB& irdbtable, const std::string& name )
37  : RdbStatsPercentiles( irdbtable, name ) {}
38 
40 
41  // calculate the regular-stats and the percentiles.
43  return 0;
44 
45  // normalize the result wrt the average.
46  double norm_factor = get_absolute_average( );
47  normalize_results( norm_factor );
48 
49  return num_n;
50 
51 }
double get_absolute_average() const
To get the absolute value of the average.
Definition: RdbStats.h:73
virtual int calculate_statistics()
Perform the final statistic for the set.
virtual int calculate_statistics()
Perform the final statistic for the set.
A class to calculate the percentiles, RdbStatsPercentiles isA special case of the class RdbStats.