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 typedef std::pair<Int64, Int64> LocationType;
45 
46 template <class AccumType> struct StatsData {
49  LocationType maxpos;
50  AccumType mean;
54  LocationType minpos;
56  AccumType nvariance;
57  AccumType rms;
58  AccumType stddev;
59  AccumType sum;
60  AccumType sumsq;
61  AccumType sumweights;
62  AccumType variance;
64 };
65 
66 template <class AccumType>
68 
69 template <class AccumType>
71 
72 template <class AccumType>
74 
75 }
76 
77 #ifndef CASACORE_NO_AUTO_TEMPLATES
78 #include <casacore/scimath/Mathematics/StatisticsTypes.tcc>
79 #endif //# CASACORE_NO_AUTO_TEMPLATES
80 
81 #endif
Record toRecord(const StatsData< AccumType > &stats)
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
std::pair< Int64, Int64 > LocationType
CountedPtr< AccumType > median
CountedPtr< AccumType > max
double Double
Definition: aipstype.h:55
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
StatsData< AccumType > initializeStatsData()
CountedPtr< AccumType > min
CountedPtr< AccumType > medAbsDevMed
this file contains all the compiler specific defines
Definition: mainpage.dox:28