| 1 |
/* FunctionSeries_def.h |
| 2 |
* |
| 3 |
* Copyright (C) 1993-2020,2025 David Weenink, Paul Boersma 2020,2022,2025 |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 3 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
/* |
| 20 |
djmw 1999 |
| 21 |
djmw 20020813 GPL header |
| 22 |
*/ |
| 23 |
|
| 24 |
#define ooSTRUCT FunctionSeries |
| 25 |
oo_DEFINE_CLASS (FunctionSeries, Function) |
| 26 |
|
| 27 |
oo_INTEGER (numberOfCoefficients) |
| 28 |
oo_VEC (coefficients, numberOfCoefficients) |
| 29 |
|
| 30 |
#if oo_DECLARING |
| 31 |
virtual double v_evaluate (double x); |
| 32 |
virtual dcomplex v_evaluate_z (dcomplex z); |
| 33 |
virtual void v_evaluateTerms (double x, VEC terms); |
| 34 |
virtual void v_getExtrema (double x1, double x2, double *xmin, double *ymin, double *xmax, double *ymax); |
| 35 |
virtual integer v_getDegree (); |
| 36 |
virtual integer capacity () { |
| 37 |
return coefficients._capacity; |
| 38 |
} |
| 39 |
virtual void resize (integer newNumberOfCoefficients) { |
| 40 |
coefficients.resize (newNumberOfCoefficients); |
| 41 |
numberOfCoefficients = newNumberOfCoefficients; // maintain invariant |
| 42 |
} |
| 43 |
#endif |
| 44 |
|
| 45 |
oo_END_CLASS (FunctionSeries) |
| 46 |
#undef ooSTRUCT |
| 47 |
|
| 48 |
/* End of file FunctionSeries_def.h */ |