casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Vi2StatsSigmasIterator.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 sigma column
28 //
29 #ifndef MSVIS_STATISTICS_VI2_STATS_SIGMAS_ITERATOR_H_
30 #define MSVIS_STATISTICS_VI2_STATS_SIGMAS_ITERATOR_H_
31 
32 #include <casacore/casa/aips.h>
34 #include <msvis/MSVis/VisBuffer2.h>
35 #include <iterator>
36 
37 namespace casa {
38 
39 // Vi2StatsSigmasIterator has the form of a CRTP base class to promote
40 // efficiency in iterator operations. The weights provided by these iterators
41 // are converted from sigmas according to 1/(sigma^2) (except for sigma == 0).
42 //
43 template<class T>
45  : public std::iterator<std::input_iterator_tag,casacore::Float> {
46 
47 public:
49 
51 
52  bool operator==(const Vi2StatsSigmasIterator& rhs);
53 
54  bool operator!=(const Vi2StatsSigmasIterator& rhs);
55 
57 
58  bool atEnd();
59 
60 protected:
62  : vb2(vb2) {};
63 
65 
67 };
68 
69 // Weights iterator over sigma cube.
71  : public Vi2StatsSigmasIterator<Vi2StatsSigmasCubeIterator> {
72 
73 public:
75 
77 
79 
81 
82  bool operator==(const Vi2StatsSigmasCubeIterator& rhs);
83 
84  bool operator!=(const Vi2StatsSigmasCubeIterator& rhs);
85 
87 
88  bool atEnd();
89 
90 protected:
97 };
98 
99 // Weights iterator over row sigmas.
101  : public Vi2StatsSigmasIterator<Vi2StatsSigmasRowIterator> {
102 
103 public:
105 
107 
109 
111 
112  bool operator==(const Vi2StatsSigmasRowIterator& rhs);
113 
114  bool operator!=(const Vi2StatsSigmasRowIterator& rhs);
115 
117 
118  bool atEnd();
119 
120 protected:
123 };
124 
125 } // namespace casa
126 
127 #endif // MSVIS_STATISTICS_VI2_STATS_SIGMAS_ITERATOR_H_
Vi2StatsSigmasIterator has the form of a CRTP base class to promote efficiency in iterator operations...
Vi2StatsSigmasIterator & operator++()
bool operator!=(const Vi2StatsSigmasIterator &rhs)
Vi2StatsSigmasIterator(vi::VisBuffer2 *vb2)
bool operator!=(const Vi2StatsSigmasCubeIterator &rhs)
bool operator!=(const Vi2StatsSigmasRowIterator &rhs)
Vi2StatsSigmasRowIterator & operator++()
Weights iterator over sigma cube.
casacore::Float operator*()
float Float
Definition: aipstype.h:54
bool operator==(const Vi2StatsSigmasCubeIterator &rhs)
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
bool operator==(const Vi2StatsSigmasRowIterator &rhs)
Weights iterator over row sigmas.
Vi2StatsSigmasCubeIterator & operator++()
bool operator==(const Vi2StatsSigmasIterator &rhs)
unsigned int uInt
Definition: aipstype.h:51