#296 closed defect (fixed)
Chebyshev polynomials don't handle special case: n=1
| Reported by: | Paul Price | Owned by: | Paul Price |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | types | Version: | 0.4.0 |
| Severity: | major | Keywords: | |
| Cc: |
Description
The special case n=1 for polynomials (i.e., simply a constant) is important to
be able to handle --- we often treat the order of the polynomial as something
that will be tuned to handle the data, and sometimes simply setting it to just a
constant is the best option.
Evaluating a chebyshev polynomial where any dimension has the order set to 1
produces a SEGV because the function createChebyshevPolys does not treat the
special case, but attempts to immediately create higher order terms:
Create the Chebyshev polynomials.
Polynomial i has i-th order.
chebPolys[0]->coeff[0] = 1;
chebPolys[1]->coeff[1] = 1;
The specific case encountered was for a psDPolynomial2D with nX = nY = 1 using
rel3, but inspection of the code reveals that it is still an issue for rel4.
Testing, performed in tst_psFunc00.c, covers only a single set of polynomial orders.
Change History (8)
comment:1 by , 21 years ago
| Owner: | changed from to |
|---|
comment:2 by , 21 years ago
| Owner: | changed from to |
|---|
comment:3 by , 21 years ago
| Status: | new → assigned |
|---|
comment:4 by , 21 years ago
This should be done in the current development version of the code.
Must improve tests to handle order-1 polynomials.
comment:5 by , 21 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → new |
comment:6 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

This should be fixed in the current development version of the code. Tests must
still be augmented to handle order-1 polynomials.