NNGridder.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef SCIMATH_NNGRIDDER_H
00030 #define SCIMATH_NNGRIDDER_H
00031
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/scimath/Mathematics/Gridder.h>
00034
00035 namespace casacore {
00036
00037
00038
00039
00040
00041 template <class Domain, class Range>
00042 class NNGridder : public Gridder<Domain, Range>
00043 {
00044 public:
00045 NNGridder(const IPosition& shape, const Vector<Domain>& scale,
00046 const Vector<Domain>& offset);
00047
00048 virtual ~NNGridder() {}
00049
00050 virtual Bool grid(Array<Range>& gridded,
00051 const Vector<Domain>& position,
00052 const Range& value);
00053
00054 virtual Bool degrid(const Array<Range>& gridded,
00055 const Vector<Domain>& position,
00056 Range& value);
00057
00058 protected:
00059 virtual Range correctionFactor1D(Int loc, Int len);
00060
00061 Vector<Int> loc;
00062
00063 protected:
00064
00065 using Gridder<Domain,Range>::ndim;
00066 using Gridder<Domain,Range>::offsetVec;
00067 using Gridder<Domain,Range>::fillCorrectionVectors;
00068 using Gridder<Domain,Range>::onGrid;
00069 };
00070
00071 }
00072
00073 #ifndef CASACORE_NO_AUTO_TEMPLATES
00074 #include <casacore/scimath/Mathematics/NNGridder.tcc>
00075 #endif //# CASACORE_NO_AUTO_TEMPLATES
00076 #endif