00001 //# Copyright (C) 2000,2001 00002 //# Associated Universities, Inc. Washington DC, USA. 00003 //# 00004 //# This library is free software; you can redistribute it and/or modify it 00005 //# under the terms of the GNU Library General Public License as published by 00006 //# the Free Software Foundation; either version 2 of the License, or (at your 00007 //# option) any later version. 00008 //# 00009 //# This library is distributed in the hope that it will be useful, but WITHOUT 00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 //# License for more details. 00013 //# 00014 //# You should have received a copy of the GNU Library General Public License 00015 //# along with this library; if not, write to the Free Software Foundation, 00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00017 //# 00018 //# Correspondence concerning AIPS++ should be addressed as follows: 00019 //# Internet email: aips2-request@nrao.edu. 00020 //# Postal address: AIPS++ Project Office 00021 //# National Radio Astronomy Observatory 00022 //# 520 Edgemont Road 00023 //# Charlottesville, VA 22903-2475 USA 00024 //# 00025 //# $Id: HostInfoDarwin.h 21521 2014-12-10 08:06:42Z gervandiepen $ 00026 00027 #ifndef SCIMATH_STATSISTICSDATA_H 00028 #define SCIMATH_STATSISTICSDATA_H 00029 00030 #include <casacore/casa/aips.h> 00031 00032 #include <map> 00033 #include <set> 00034 #include <math.h> 00035 00036 namespace casacore { 00037 00038 class String; 00039 00040 /* 00041 * This class simply defines the enum of supported statistics types 00042 * in the statistics framework. 00043 */ 00044 00045 class StatisticsData { 00046 public: 00047 00048 // implemented algorithms 00049 enum ALGORITHM { 00050 CHAUVENETCRITERION, 00051 CLASSICAL, 00052 FITTOHALF, 00053 HINGESFENCES 00054 }; 00055 00056 enum STATS { 00057 MAX, 00058 MEAN, 00059 MIN, 00060 NPTS, 00061 RMS, 00062 STDDEV, 00063 SUM, 00064 SUMSQ, 00065 // sum of weights 00066 SUMWEIGHTS, 00067 VARIANCE 00068 }; 00069 00070 // get the zero-based indices of the specified fractions in a CDF with npts 00071 // number of good points. The returned map maps fractions to indices. 00072 static std::map<Double, uInt64> indicesFromFractions( 00073 uInt64 npts, const std::set<Double>& fractions 00074 ); 00075 00076 static String toString(STATS stat); 00077 00078 }; 00079 00080 } 00081 00082 #endif