IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 20 years ago

Closed 20 years ago

#768 closed defect (fixed)

psMinimizePowell.c uses static vectors

Reported by: Paul Price Owned by: David.Robbins@…
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.

Change History (1)

comment:1 by Paul Price, 20 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.