Opened 20 years ago
Closed 20 years ago
#768 closed defect (fixed)
psMinimizePowell.c uses static vectors
| Reported by: | Paul Price | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | math | Version: | 0.11.0 |
| Severity: | normal | Keywords: | |
| Cc: | gusciora@… |
Description
Static variables must be removed from this function, or else their use clearly
justified.
Note:
See TracTickets
for help on using tickets.

I have removed the use of PS_VECTOR_GEN_STATIC_RECYCLED by generating the
vectors and freeing them in the proper place. If the function is slow, we can
use pre-allocated buffers that we pass around.
That leaves:
static psMinimizeChi2PowellFunc Chi2PowellFunc = NULL;
static psVector *PowellValue;
static psVector *PowellError;
I stuff these into an extended copy of the coords array so they can be passed
directly to the function which measures chi2.
The code compiles and passes the extant tests:
PASS: tst_psMinimizePowell
Changes checked in to CVS head.