NNGridder.h

Go to the documentation of this file.
00001 //# NNGridder.h: Definition for Nearest Neighbour Gridder
00002 //# Copyright (C) 1996,1997,1999
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id$
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 { //# NAMESPACE CASACORE - BEGIN
00036 
00037 // <summary>
00038 // A non-negative gridding class
00039 // </summary>
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   //# Make members of parent classes known.
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 } //# NAMESPACE CASACORE - END
00072 
00073 #ifndef CASACORE_NO_AUTO_TEMPLATES
00074 #include <casacore/scimath/Mathematics/NNGridder.tcc>
00075 #endif //# CASACORE_NO_AUTO_TEMPLATES
00076 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1