casacore
StatisticsIncrementer.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_STATISTICSINCREMENTER_H
28 #define SCIMATH_STATISTICSINCREMENTER_H
29 
30 #include <casacore/casa/aips.h>
31 
32 namespace casacore {
33 
34 // Utility functions used for incrementing pointers in a data set used by the stats framework.
35 
36 template <class DataIterator, class MaskIterator=const Bool *, class WeightsIterator=DataIterator>
38 public:
39 
41 
42  //<group>
43  // <src> loopCount is always incremented by one, independent of the values
44  // of <src>dataStride</src> and <src>maskStride</src>
45  inline static void increment(
46  DataIterator& datum, Int64& loopCount, Bool unityStride, uInt dataStride
47  );
48 
49  inline static void increment(
50  DataIterator& datum, Int64& loopCount, WeightsIterator& weight,
51  Bool unityStride, uInt dataStride
52  );
53 
54  inline static void increment(
55  DataIterator& datum, Int64& loopCount, MaskIterator& mask,
56  Bool unityStride, uInt dataStride, uInt maskStride
57  );
58 
59  inline static void increment(
60  DataIterator& datum, Int64& loopCount,
61  WeightsIterator& weight, MaskIterator& mask,
62  Bool unityStride, uInt dataStride, uInt maskStride
63  );
64  // </group>
65 
66 private:
67  // Just static methods, disallow constructor
69 
70 };
71 
72 }
73 
74 #ifndef CASACORE_NO_AUTO_TEMPLATES
75 #include <casacore/scimath/Mathematics/StatisticsIncrementer.tcc>
76 #endif
77 
78 #endif
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
static void increment(DataIterator &datum, Int64 &loopCount, Bool unityStride, uInt dataStride)
loopCount is always incremented by one, independent of the values of <src>dataStride and maskStride ...
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
StatisticsIncrementer()
Just static methods, disallow constructor.
Utility functions used for incrementing pointers in a data set used by the stats framework.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:39
this file contains all the compiler specific defines
Definition: mainpage.dox:28
unsigned int uInt
Definition: aipstype.h:48