source: branches/plotter2/src/NearestInterpolator1D.h@ 2887

Last change on this file since 2887 was 2733, checked in by Takeshi Nakazato, 12 years ago

New Development: No

JIRA Issue: Yes CAS-4770

Ready for Test: Yes

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Redefined Interpolator1D and derived classes as template class.


File size: 1.1 KB
Line 
1//
2// C++ Interface: NearestInterpolator1D
3//
4// Description:
5//
6//
7// Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef ASAP_NEAREST_INTERPOLATOR_1D_H
13#define ASAP_NEAREST_INTERPOLATOR_1D_H
14
15#include <memory>
16#include <vector>
17
18#include <casa/aips.h>
19#include <casa/Containers/Block.h>
20#include <casa/Arrays/Vector.h>
21#include <casa/Arrays/Matrix.h>
22#include <casa/BasicSL/String.h>
23#include <casa/Utilities/CountedPtr.h>
24
25#include "Interpolator1D.h"
26
27namespace asap {
28
29/**
30 * Implementation of nearest interpolation.
31 * @author TakeshiNakazato
32 */
33template <class T, class U>
34class NearestInterpolator1D : public Interpolator1D<T, U> {
35public:
36 // Default constructor.
37 NearestInterpolator1D();
38
39 // Destructor.
40 virtual ~NearestInterpolator1D();
41
42 // Perform interpolation.
43 // @param[in] x horizontal location where the value is evaluated
44 // by interpolation.
45 // @return interpolated value at x.
46 // @see Interpolator1D::interpolate()
47 U interpolate(T x);
48};
49
50}
51
52#include "NearestInterpolator1D.tcc"
53
54#endif
Note: See TracBrowser for help on using the repository browser.