rdbstats  2.0.7
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 std::string& percent_list,
33  bool implicitquartile )
34  : RdbStatsPercentiles( irdbtable, name, percent_list, implicitquartile ) {}
35 
36 // --quartiles was entered at the command line.
37 RdbStatsPercentilesAve::RdbStatsPercentilesAve( RDB& irdbtable, const std::string& name )
38  : RdbStatsPercentiles( irdbtable, name ) {}
39 
41 
42  // calculate the regular-stats and the percentiles.
44  return 0;
45 
46  // normalize the result wrt the average.
47  double norm_factor = get_absolute_average( );
48  normalize_results( norm_factor );
49 
50  return num_n;
51 
52 }
double get_absolute_average() const
To get the absolute value of the average.
Definition: RdbStats.h:51
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.