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