casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vi2StatsWeightsIterator.h
Go to the documentation of this file.
1 // -*- mode: c++ -*-
2 //# Copyright (C) 1996,1997,1998,1999,2000,2002,2003,2015
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //
27 // casacore::Data provider weights iterators, based on weights column
28 //
29 #ifndef MSVIS_STATISTICS_VI2_STATS_WEIGHTS_ITERATOR_H_
30 #define MSVIS_STATISTICS_VI2_STATS_WEIGHTS_ITERATOR_H_
31 
32 #include <casacore/casa/aips.h>
34 #include <msvis/MSVis/VisBuffer2.h>
35 #include <iterator>
36 
37 namespace casa {
38 
39 // Vi2StatsWeightsIterator has the form of a CRTP base class to promote
40 // efficiency in iterator operations.
41 //
42 template<class T>
44  : public std::iterator<std::input_iterator_tag,casacore::Float> {
45 
46 public:
48 
50 
51  bool operator==(const Vi2StatsWeightsIterator& rhs);
52 
53  bool operator!=(const Vi2StatsWeightsIterator& rhs);
54 
56 
57  bool atEnd();
58 
59 protected:
61  : vb2(vb2) {};
62 
64 
66 };
67 
68 // Weights iterator over weights cube.
70  : public Vi2StatsWeightsIterator<Vi2StatsWeightsCubeIterator> {
71 
72 public:
74 
76 
78 
80 
81  bool operator==(const Vi2StatsWeightsCubeIterator& rhs);
82 
83  bool operator!=(const Vi2StatsWeightsCubeIterator& rhs);
84 
86 
87  bool atEnd();
88 
89 protected:
96 };
97 
98 // Weights iterator over row weights.
100  : public Vi2StatsWeightsIterator<Vi2StatsWeightsRowIterator> {
101 
102 public:
104 
106 
108 
110 
111  bool operator==(const Vi2StatsWeightsRowIterator& rhs);
112 
113  bool operator!=(const Vi2StatsWeightsRowIterator& rhs);
114 
116 
117  bool atEnd();
118 
119 protected:
122 };
123 
124 } // namespace casa
125 
126 #endif // MSVIS_STATISTICS_VI2_STATS_WEIGHTS_ITERATOR_H_
bool operator!=(const Vi2StatsWeightsCubeIterator &rhs)
bool operator==(const Vi2StatsWeightsCubeIterator &rhs)
Weights iterator over weights cube.
bool operator!=(const Vi2StatsWeightsRowIterator &rhs)
Vi2StatsWeightsIterator & operator++()
Vi2StatsWeightsRowIterator & operator++()
Weights iterator over row weights.
bool operator==(const Vi2StatsWeightsIterator &rhs)
Vi2StatsWeightsCubeIterator & operator++()
Vi2StatsWeightsIterator(vi::VisBuffer2 *vb2)
float Float
Definition: aipstype.h:54
bool operator==(const Vi2StatsWeightsRowIterator &rhs)
Vi2StatsWeightsIterator has the form of a CRTP base class to promote efficiency in iterator operation...
casacore::Float operator*()
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
bool operator!=(const Vi2StatsWeightsIterator &rhs)
unsigned int uInt
Definition: aipstype.h:51