source: trunk/src/Locator.h@ 2721

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

New Development: Yes

JIRA Issue: Yes CAS-4770 and its sub-tickets

Ready for Test: Yes

Interface Changes: 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...

First version of applycal for single dish calibration.
Added new classes for the operation (STApplyCal, Calibrator, PSAlmaCalibrator,
Locator, BisectionLocator, Interpolator1D, NearestInterpolator1D).
Also, modified existing classes to fit with implementation of applycal.


File size: 920 bytes
Line 
1//
2// C++ Interface: Locator
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_LOCATOR_H
13#define ASAP_LOCATOR_H
14
15#include <memory>
16#include <vector>
17
18#include <casa/aips.h>
19#include <casa/Arrays/Vector.h>
20#include <casa/Arrays/Matrix.h>
21#include <casa/BasicSL/String.h>
22#include <casa/Utilities/CountedPtr.h>
23
24namespace asap {
25
26/**
27 * Base class for locate operation
28 * @author TakeshiNakazato
29 */
30class Locator {
31public:
32 Locator() {;}
33 Locator(double *v, unsigned int n);
34 void set(double *v, unsigned int n);
35
36 virtual ~Locator();
37
38 // return right hand side index of location
39 // (return j+1 if x[j] < x <= x[j+1])
40 // return value 0 or x.nelements() indicates out of range
41 virtual unsigned int locate(double x) = 0;
42
43protected:
44 double *x_;
45 unsigned int n_;
46};
47
48}
49#endif
Note: See TracBrowser for help on using the repository browser.