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