casacore
StatisticsTypes.h
Go to the documentation of this file.
1 //# Copyright (C) 2000,2001
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 //# $Id: Array.h 21545 2015-01-22 19:36:35Z gervandiepen $
26 
27 #ifndef SCIMATH_STATISTICSTYPES_H
28 #define SCIMATH_STATISTICSTYPES_H
29 
30 #include <casacore/casa/aips.h>
31 
32 #include <utility>
33 #include <vector>
34 
35 namespace casacore {
36 
37 class Record;
38 template <class T> class CountedPtr;
39 
40 // Commonly used types in statistics framework.
41 
42 #define DataRanges std::vector<std::pair<AccumType, AccumType> >
43 
44 template <class AccumType> struct StatsData {
47  std::pair<Int64, Int64> maxpos;
48  AccumType mean;
52  std::pair<Int64, Int64> minpos;
54  AccumType nvariance;
55  AccumType rms;
56  AccumType stddev;
57  AccumType sum;
58  AccumType sumsq;
59  AccumType sumweights;
60  AccumType variance;
62 };
63 
64 template <class AccumType>
66 
67 template <class AccumType>
69 
70 template <class AccumType>
72 
73 }
74 
75 #ifndef CASACORE_NO_AUTO_TEMPLATES
76 #include <casacore/scimath/Mathematics/StatisticsTypes.tcc>
77 #endif //# CASACORE_NO_AUTO_TEMPLATES
78 
79 #endif
std::pair< Int64, Int64 > minpos
Record toRecord(const StatsData< AccumType > &stats)
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
CountedPtr< AccumType > median
CountedPtr< AccumType > max
double Double
Definition: aipstype.h:52
std::pair< Int64, Int64 > maxpos
A hierarchical collection of named fields of various types.
Definition: Record.h:181
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:39
StatsData< AccumType > initializeStatsData()
CountedPtr< AccumType > min
CountedPtr< AccumType > medAbsDevMed
this file contains all the compiler specific defines
Definition: mainpage.dox:28