casacore
Loading...
Searching...
No Matches
ChebyshevParam.h
Go to the documentation of this file.
1//# ChebyshevParam.h: Parameter handling for Chebyshev polynomial
2//# Copyright (C) 2000,2001,2002,2003,2005
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: casa-feedback@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
28#ifndef SCIMATH_CHEBYSHEVPARAM_H
29#define SCIMATH_CHEBYSHEVPARAM_H
30
31#include <casacore/casa/aips.h>
32#include <casacore/casa/Arrays/ArrayFwd.h>
33#include <casacore/casa/BasicSL/String.h>
34#include <casacore/scimath/Functionals/Function1D.h>
35
36namespace casacore { //# NAMESPACE CASACORE - BEGIN
37
38//# Forward Declarations
39class RecordInterface;
40
41// <summary>
42// Define enums for Chebyshev classes
43// </summary>
45{
46public:
47 // Modes that identify how this function behaves outside its Chebyshev
48 // interval (see setInterval()).
50
51 // return a constant, default value. The value returned is
52 // set with setDefault().
54
55 // return a constant value equal to the zero-th order coefficient
57
58 // evaluate the polynomial based on its coefficients just as it
59 // would be inside the interval. Thus, the function's range is not
60 // guaranteed to remain within the characteristic bounds of the
61 // Chebyshev interval.
63
64 // evaluate the function as if the range is cyclic, repeating the
65 // range values from its canonical domain. The period of the cycle
66 // will be equal to getIntervalMax()-getIntervalMin(). When the
67 // function is evaluated outside this interval, the input value will
68 // shifted an integer number of periods until it falls within the
69 // Chebyshev interval; the value returned is the polynomial evaluated
70 // at the shifted (x-axis) value. Obviously, this mode is most
71 // expensive computationally when evaluating outside the range.
73
74 // evaluate the function at nearest interval edge
76
77 // number of enumerators
79};
80
81
82// <summary> Parameter handling for Chebyshev polynomial parameters
83// </summary>
84
85// <use visibility=local>
86
87// <reviewed reviewer="wbrouw" date="2001/11/12" tests="tChebyshev" demos="">
88// </reviewed>
89
90// <prerequisite>
91// <li> <linkto class="FunctionParam">FunctionParam</linkto> class
92// <li> <linkto class="Function1D">Function1D</linkto>
93// <li> <linkto class="Chebyshev">Chebyshev</linkto>
94// </prerequisite>
95//
96// <etymology>
97// This class is named after Chebyshev Type I polynomials; it handles the
98// "fixed" parameters for the function.
99// </etymology>
100//
101// <synopsis>
102// This class assists in forming and evaluating a function as a
103// Chebyshev series, a linear combination of so-called Chebyshev
104// polynomials. Users do not instantiate this abstract class directly;
105// instead they instantiate the child class
106// <linkto class="Chebyshev">Chebyshev</linkto>. This class holds the part
107// of the implementation used by the
108// <linkto class="Chebyshev">Chebyshev</linkto> class that manages the "fixed"
109// parameters of the function (e.g. the polynomial coefficients, interval of
110// interest, etc.)
111//
112// For a full description, see the
113// <linkto class="Chebyshev">Chebyshev</linkto> class.
114//
115// </synopsis>
116//
117// <example>
118// In this example, a 2nd order Chebyshev polynomial series is
119// created.
120// <srcblock>
121// // set coeffs to desired values
122// Vector<Double> coeffs(3, 1);
123//
124// // configure the function
125// Chebyshev<Double> cheb;
126// cheb.setInterval(-0.8, 7.2);
127// cheb.setDefault(1.0);
128// cheb.setCoefficients(coeffs);
129//
130// // evaluate the function as necessary
131// Double z = cheb(-0.5); // -0.5 is within range, z = 0.78625
132// z = cheb(4.2); // 4.2 is within range, z = 0.375
133// z = cheb(-3); // -3 is out of the interval, z = 1
134// </srcblock>
135// </example>
136//
137// <motivation>
138// This class was created to support systematic errors in the simulator tool.
139// It can be used by Jones matrix classes to vary gains in a predictable way,
140// mimicing natural processes of the atmosphere or instrumental effects.
141//
142// The Chebyshev implementation is split between this class,
143// <src>ChebyshevParam</src> and its child
144// <linkto class="Chebyshev">Chebyshev</linkto> to better support the
145// <linkto class="AutoDiff">AutoDiff framework</linkto> for evaluating
146// derivatives.
147// </motivation>
148//
149// <templating arg=T>
150// <li> T should have standard numerical operators. Current
151// implementation only tested for real types (and their AutoDiffs).
152// </templating>
153//
154// <thrown>
155// <li> Assertion if indices out-of-range
156// </thrown>
157//
158// <todo asof="2001/08/22">
159// <li> It would be helpful to be able to convert to and from the
160// Polynomial<T> type; this would be supported via a function,
161// Polynomial<T> polynomial(), and constructor,
162// Chebyshev(Polynomial<T>)
163// </todo>
164
165template<class T>
166class ChebyshevParam : public Function1D<T>
167{
168public:
169
170 //# Constructors
171 // create a zero-th order Chebyshev polynomial with the first coefficient
172 // equal to zero. The bounded domain is [T(-1), T(1)]. The
173 // OutOfDomainMode is CONSTANT, and the default value is T(0).
175
176 // create an n-th order Chebyshev polynomial with the coefficients
177 // equal to zero. The bounded domain is [T(-1), T(1)]. The
178 // OutOfDomainMode is CONSTANT, and the default value is T(0).
179 explicit ChebyshevParam(const uInt n);
180
181 // create a zero-th order Chebyshev polynomical with the first coefficient
182 // equal to one.
183 // min is the minimum value of its Chebyshev interval, and
184 // max is the maximum value.
185 // mode sets the behavior of the function outside the Chebyshev interval
186 // (see setOutOfIntervalMode() and OutOfIntervalMode enumeration
187 // definition for details).
188 // defval is the value returned when the function is evaluated outside
189 // the Chebyshev interval and mode=CONSTANT.
190 ChebyshevParam(const T &min, const T &max,
192 mode=ChebyshevEnums::CONSTANT, const T &defval=T(0));
193
194 // create a fully specified Chebyshev polynomial.
195 // coeffs holds the coefficients of the Chebyshev polynomial (see
196 // setCoefficients() for details).
197 // min is the minimum value of its canonical range, and
198 // max is the maximum value.
199 // mode sets the behavior of the function outside the Chebyshev interval
200 // (see setOutOfIntervalMode() and OutOfIntervalMode enumeration
201 // definition for details).
202 // defval is the value returned when the function is evaluated outside
203 // the canonical range and mode=CONSTANT.
204 ChebyshevParam(const Vector<T> &coeffs, const T &min, const T &max,
206 mode=ChebyshevEnums::CONSTANT, const T &defval=T(0));
207
208 // create a fully specified Chebyshev polynomial.
209 // config is a record that contains the non-coefficient data
210 // that configures this class.
211 // The fields recognized by this class are those documented for the
212 // setMode() function below.
213 // <group>
215 ChebyshevParam(const Vector<T> &coeffs, const RecordInterface& mode);
216 // </group>
217
218 // create a deep copy of another Chebyshev polynomial
219 // <group>
221 template <class W>
223 Function1D<T>(other), def_p(other.getDefault()),
224 minx_p(other.getIntervalMin()), maxx_p(other.getIntervalMax()),
225 mode_p(other.getOutOfIntervalMode()) {}
226 // </group>
227
228 // make a (deep) copy of another Chebyshev polynomial
230
231 // Destructor
233
234 // set the Chebyshev coefficients.
235 // coeffs holds the coefficients in order, beginning with the zero-th
236 // order term. The order of the polynomial, then, would be the size
237 // of the Vector minus one.
238 void setCoefficients(const Vector<T> &coeffs);
239
240 // set a particular Chebyshev coefficient.
241 // which is the coefficient order (i.e. 0 refers to the constant offset).
242 // value is the coefficient value.
243 // If which is larger than current order of the function, the order will
244 // be increased to the value of which, and that coefficient is set to
245 // value; missing coefficients less than this value will be set to zero.
246 // Thus, the order can be increased with this function; however, it cannot
247 // be decreased (even if the highest order coefficient is set to zero).
248 // To lower the order, use setCoefficients() with a Vector having the
249 // desired number of coefficients.
250 void setCoefficient(const uInt which, const T &value);
251
252 // return the current set of coefficients into a given Vector.
254
255 // return a particular coefficient.
256 // which is the coefficient order (i.e. 0 refers to the constant offset).
257 // If which is out of range, zero is returned.
258 T getCoefficient(const uInt which) const {
259 return ((which < nparameters()) ? param_p[which] : T(0)); }
260
261 // return the number of coeefficients currently loaded. This does not
262 // guarantee that the coefficients are non-zero
263 uInt nCoefficients() const { return nparameters(); }
264
265 // set the Chebyshev interval for this function. The function will
266 // be scaled and shifted to such that the central bounded range of the
267 // Chebyshev polynomials ([-1, 1] in untransformed space) spans the
268 // given range.
269 // min is the minimum value for the interval, and
270 // max is the maximum value. See setOutOfIntervalMode() for the behavior
271 // of this function outside the set range.
272 void setInterval(T xmin, T xmax) {
273 if (xmin < xmax) { minx_p = xmin; maxx_p = xmax;
274 } else { minx_p = xmax; maxx_p = xmin; } }
275
276 // return the minimum value for the currently Chebyshev interval.
277 // See setInterval() for additional details.
278 T getIntervalMin() const { return minx_p; }
279
280 // return the maximum value for the currently Chebyshev interval.
281 // See setInterval() for additional details.
282 T getIntervalMax() const { return maxx_p; }
283
284 // set the behavior of this function when it is evaluated outside its
285 // Chebyshev interval
288
289 // return the behavior of this function when it is evaluated outside of
290 // its Chebyshev interval.
293
294 // set the default value of this function. This value is used when
295 // the getOutOfIntervalMode() returns Chebyshev::CONSTANT; it is returned
296 // when the a value outside of the Chebyshev interval is passed to
297 // the () operator.
298 void setDefault(const T &val) { def_p = val; }
299
300 // return the currently set default value. See setDefault() for details
301 // on the use of this value.
302 const T &getDefault() const { return def_p; }
303
304 // return the order of this polynomial. This returns the value of
305 // nCoefficients()-1;
306 uInt order() const { return param_p.nelements() - 1; }
307
308 // transform a set of Chebyshev polynomial coefficients into a set
309 // representing the series' derivative. coeffs should be assuming
310 // an interval of [-1, 1]. xmin and xmax can be provided to transform
311 // the series to another interval.
312 static void derivativeCoeffs(Vector<T> &coeffs, const T &xmin=T(-1),
313 const T &xmax=T(1));
314
315 // convert a set of Chebyshev polynomial coefficients to power series
316 // coefficients. The values passed in coeffs are taken to
317 // be chebyshev coefficients; these values will be replaced with the
318 // power series coefficients. They should be ordered beginning
319 // with the zero-th order coefficient.
320 static void chebyshevToPower(Vector<T> &coeffs);
321
322 // convert a set of power series coefficients to Chebyshev
323 // polynomial coefficients. The values passed in coeffs are taken to
324 // be power series coefficients; these values will be replaced with the
325 // Chebyshev polynomial coefficients. They should be ordered beginning
326 // with the zero-th order coefficient.
327 static void powerToChebyshev(Vector<T> &coeffs);
328
329 // Give name of function
330 virtual const String &name() const { static String x("chebyshev");
331 return x; }
332
333protected:
334
335 // Default value if outside interval
337 // Lowest interval bound
339 // Highest inetrval bound
341 // Out-of-interval handling type
343
345
346 //# Make members of parent classes known.
347protected:
348 using Function1D<T>::param_p;
349public:
351 using Function1D<T>::setMode;
352};
353
354
355// <summary> A ChebyshevParam with the get/setMode implementation </summary>
356//
357// <synopsis>
358// The get/setMode() implementation is separated from ChebyshevParam
359// to enable simple specialization for AutoDiff. See
360// <linkto class="ChebyshevParam">ChebyshevParam</linkto> for documentation
361// </synopsis>
362template <class T>
364{
365public:
367
368 explicit ChebyshevParamModeImpl(const uInt n) : ChebyshevParam<T>(n) {}
369
370 ChebyshevParamModeImpl(const T &min, const T &max,
372 const T &defval=T(0))
373 : ChebyshevParam<T>(min, max, mode, defval) {}
374
376 const T &min, const T &max,
378 const T &defval=T(0))
379 : ChebyshevParam<T>(coeffs, min, max, mode, defval) {}
380
384 const RecordInterface& mode)
385 : ChebyshevParam<T>(coeffs, mode) { setMode(mode); }
386
389
390 // get/set the function mode. This is an alternate way to get/set the
391 // non-coefficient data for this function. The supported record fields
392 // are as follows:
393 // <pre>
394 // Field Name Type Role
395 // -------------------------------------------------------------------
396 // min template type the minimum value of the Chebyshev
397 // interval of interest
398 // max template type the maximum value of the Chebyshev
399 // interval of interest
400 // intervalMode TpString the out-of-interval mode; recognized
401 // values are "constant", "zeroth",
402 // "extrapolate", "cyclic", and "edge".
403 // setMode() recognizes a
404 // case-insensitive, minimum match.
405 // default template type the out-of-range value that is returned
406 // when the out-of-interval mode is
407 // "constant".
408 // </pre>
409 // An exception is thrown if interval mode is unrecognized.
410 // <group>
411 virtual void setMode(const RecordInterface& mode);
412 virtual void getMode(RecordInterface& mode) const;
413 // </group>
414
415 // return True if the implementing function supports a mode. This
416 // implementation always returns True.
417 virtual Bool hasMode() const;
418
419 //# Make members of parent classes known.
420protected:
422public:
428};
429
430#define ChebyshevParamModeImpl_PS ChebyshevParamModeImpl
431
432// <summary> Partial specialization of ChebyshevParamModeImpl for
433// <src>AutoDiff</src>
434// </summary>
435// <synopsis>
436// <note role=warning> The name <src>ChebyshevParamModeImpl_PS</src> is only
437// for cxx2html limitations.
438// </note>
439// </synopsis>
440template <class T>
442 : public ChebyshevParam<AutoDiff<T> >
443{
444public:
446
448 : ChebyshevParam<AutoDiff<T> >(n) {}
449
451 typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT,
452 const AutoDiff<T> &defval=AutoDiff<T>(0))
453 : ChebyshevParam<AutoDiff<T> >(min, max, mode, defval) {}
454
456 const AutoDiff<T> &min, const AutoDiff<T> &max,
457 typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT,
458 const AutoDiff<T> &defval=AutoDiff<T>(0))
459 : ChebyshevParam<AutoDiff<T> >(coeffs, min, max, mode, defval) {}
460
462 : ChebyshevParam<AutoDiff<T> >(order, mode) {}
464 const RecordInterface& mode)
465 : ChebyshevParam<AutoDiff<T> >(coeffs, mode) {}
466
469
470 virtual void setMode(const RecordInterface& mode);
471 virtual void getMode(RecordInterface& mode) const;
472
473 //# Make members of parent classes known.
474protected:
475 using ChebyshevParam<AutoDiff<T> >::modes_s;
476public:
477 using ChebyshevParam<AutoDiff<T> >::setOutOfIntervalMode;
478 using ChebyshevParam<AutoDiff<T> >::getOutOfIntervalMode;
479 using ChebyshevParam<AutoDiff<T> >::getIntervalMin;
480 using ChebyshevParam<AutoDiff<T> >::getIntervalMax;
481 using ChebyshevParam<AutoDiff<T> >::getDefault;
482};
483
484
485#define ChebyshevParamModeImpl_PSA ChebyshevParamModeImpl
486
487// <summary> Partial specialization of ChebyshevParamModeImpl for
488// <src>AutoDiff</src>
489// </summary>
490// <synopsis>
491// <note role=warning> The name <src>ChebyshevParamModeImpl_PS</src> is only
492// for cxx2html limitations.
493// </note>
494// </synopsis>
495template <class T>
497 : public ChebyshevParam<AutoDiffA<T> >
498{
499public:
501
503 : ChebyshevParam<AutoDiffA<T> >(n) {}
504
506 const AutoDiffA<T> &max,
507 typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT,
508 const AutoDiffA<T> &defval=AutoDiffA<T>(0))
509 : ChebyshevParam<AutoDiffA<T> >(min, max, mode, defval) {}
510
512 const AutoDiffA<T> &min,
513 const AutoDiffA<T> &max,
514 typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT,
515 const AutoDiffA<T> &defval=AutoDiffA<T>(0))
516 : ChebyshevParam<AutoDiffA<T> >(coeffs, min, max, mode, defval) {}
517
519 : ChebyshevParam<AutoDiffA<T> >(order, mode) {}
521 const RecordInterface& mode)
522 : ChebyshevParam<AutoDiffA<T> >(coeffs, mode) {}
523
526
527 virtual void setMode(const RecordInterface& mode);
528 virtual void getMode(RecordInterface& mode) const;
529
530 //# Make members of parent classes known.
531protected:
532 using ChebyshevParam<AutoDiffA<T> >::modes_s;
533public:
534 using ChebyshevParam<AutoDiffA<T> >::setOutOfIntervalMode;
535 using ChebyshevParam<AutoDiffA<T> >::getOutOfIntervalMode;
536 using ChebyshevParam<AutoDiffA<T> >::getIntervalMin;
537 using ChebyshevParam<AutoDiffA<T> >::getIntervalMax;
538 using ChebyshevParam<AutoDiffA<T> >::getDefault;
539};
540
541
542
543
544} //# NAMESPACE CASACORE - END
545
546#ifndef CASACORE_NO_AUTO_TEMPLATES
547#include <casacore/scimath/Functionals/ChebyshevParam.tcc>
548#endif //# CASACORE_NO_AUTO_TEMPLATES
549#endif
550
551
#define ChebyshevParamModeImpl_PSA
#define ChebyshevParamModeImpl_PS
OutOfIntervalMode
Modes that identify how this function behaves outside its Chebyshev interval (see setInterval()).
@ NOutOfIntervalModes
number of enumerators
@ CYCLIC
evaluate the function as if the range is cyclic, repeating the range values from its canonical domain...
@ CONSTANT
return a constant, default value.
@ EDGE
evaluate the function at nearest interval edge
@ ZEROTH
return a constant value equal to the zero-th order coefficient
@ EXTRAPOLATE
evaluate the polynomial based on its coefficients just as it would be inside the interval.
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
ChebyshevParamModeImpl_PSA(const Vector< AutoDiffA< T > > &coeffs, const AutoDiffA< T > &min, const AutoDiffA< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiffA< T > &defval=AutoDiffA< T >(0))
ChebyshevParamModeImpl_PSA(uInt order, const RecordInterface &mode)
ChebyshevParamModeImpl_PSA(const AutoDiffA< T > &min, const AutoDiffA< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiffA< T > &defval=AutoDiffA< T >(0))
ChebyshevParamModeImpl_PSA(const ChebyshevParamModeImpl_PSA &other)
virtual void getMode(RecordInterface &mode) const
ChebyshevParamModeImpl_PSA(const Vector< AutoDiffA< T > > &coeffs, const RecordInterface &mode)
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
ChebyshevParamModeImpl_PS(const AutoDiff< T > &min, const AutoDiff< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiff< T > &defval=AutoDiff< T >(0))
virtual void getMode(RecordInterface &mode) const
ChebyshevParamModeImpl_PS(const Vector< AutoDiff< T > > &coeffs, const AutoDiff< T > &min, const AutoDiff< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiff< T > &defval=AutoDiff< T >(0))
ChebyshevParamModeImpl_PS(uInt order, const RecordInterface &mode)
ChebyshevParamModeImpl_PS(const Vector< AutoDiff< T > > &coeffs, const RecordInterface &mode)
ChebyshevParamModeImpl_PS(const ChebyshevParamModeImpl_PS &other)
A ChebyshevParam with the get/setMode implementation.
virtual Bool hasMode() const
return True if the implementing function supports a mode.
virtual void getMode(RecordInterface &mode) const
ChebyshevParamModeImpl(const ChebyshevParamModeImpl &other)
ChebyshevParamModeImpl(const Vector< T > &coeffs, const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
ChebyshevParamModeImpl(const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
ChebyshevParamModeImpl(uInt order, const RecordInterface &mode)
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
ChebyshevParamModeImpl(const Vector< T > &coeffs, const RecordInterface &mode)
Parameter handling for Chebyshev polynomial parameters.
ChebyshevParam(const uInt n)
create an n-th order Chebyshev polynomial with the coefficients equal to zero.
void setCoefficients(const Vector< T > &coeffs)
set the Chebyshev coefficients.
T getIntervalMin() const
return the minimum value for the currently Chebyshev interval.
void setCoefficient(const uInt which, const T &value)
set a particular Chebyshev coefficient.
T def_p
Default value if outside interval.
ChebyshevParam()
create a zero-th order Chebyshev polynomial with the first coefficient equal to zero.
void setDefault(const T &val)
set the default value of this function.
uInt order() const
return the order of this polynomial.
ChebyshevParam(uInt order, const RecordInterface &mode)
create a fully specified Chebyshev polynomial.
ChebyshevParam(const T &min, const T &max, ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
create a zero-th order Chebyshev polynomical with the first coefficient equal to one.
static void derivativeCoeffs(Vector< T > &coeffs, const T &xmin=T(-1), const T &xmax=T(1))
transform a set of Chebyshev polynomial coefficients into a set representing the series' derivative.
T getIntervalMax() const
return the maximum value for the currently Chebyshev interval.
ChebyshevEnums::OutOfIntervalMode getOutOfIntervalMode() const
return the behavior of this function when it is evaluated outside of its Chebyshev interval.
ChebyshevParam(const ChebyshevParam &other)
create a deep copy of another Chebyshev polynomial
static void powerToChebyshev(Vector< T > &coeffs)
convert a set of power series coefficients to Chebyshev polynomial coefficients.
ChebyshevParam(const ChebyshevParam< W > &other)
void setOutOfIntervalMode(ChebyshevEnums::OutOfIntervalMode mode)
set the behavior of this function when it is evaluated outside its Chebyshev interval
T maxx_p
Highest inetrval bound.
static Vector< String > modes_s
T getCoefficient(const uInt which) const
return a particular coefficient.
virtual const String & name() const
Give name of function.
const T & getDefault() const
return the currently set default value.
ChebyshevParam< T > & operator=(const ChebyshevParam< T > &other)
make a (deep) copy of another Chebyshev polynomial
virtual ~ChebyshevParam()
Destructor.
ChebyshevParam(const Vector< T > &coeffs, const T &min, const T &max, ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
create a fully specified Chebyshev polynomial.
ChebyshevParam(const Vector< T > &coeffs, const RecordInterface &mode)
uInt nCoefficients() const
return the number of coeefficients currently loaded.
ChebyshevEnums::OutOfIntervalMode mode_p
Out-of-interval handling type.
T minx_p
Lowest interval bound.
void setInterval(T xmin, T xmax)
set the Chebyshev interval for this function.
const Vector< T > & getCoefficients() const
return the current set of coefficients into a given Vector.
static void chebyshevToPower(Vector< T > &coeffs)
convert a set of Chebyshev polynomial coefficients to power series coefficients.
FunctionParam< T > param_p
The parameters and masks.
Definition Function.h:330
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
uInt nparameters() const
Returns the number of parameters.
Definition Function.h:228
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
unsigned int uInt
Definition aipstype.h:49
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.