IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 20, 2010, 11:47:48 AM (16 years ago)
Author:
eugene
Message:

added pre-ffted kernel convolutions, changed minimization to accept maxTol and minTol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psMinimizePowell.c

    r28635 r28998  
    457457
    458458        mul = bracket->data.F32[1];
    459         if ((fabs(a-b) < min->tol) && (fabs(b-c) < min->tol)) {
     459        if ((fabs(a-b) < min->minTol) && (fabs(b-c) < min->minTol)) {
    460460            PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, params, mul);
    461461            min->value = func(params, coords);
     
    524524    psTrace("psLib.math", 4, "---- psMinimizePowell() begin ----\n");
    525525    psTrace("psLib.math", 6, "min->maxIter is %d\n", min->maxIter);
    526     psTrace("psLib.math", 6, "min->tol is %f\n", min->tol);
     526    psTrace("psLib.math", 6, "min->minTol is %f\n", min->minTol);
    527527
    528528    if (paramMask == NULL) {
     
    573573        for (i=0;i<numDims;i++) {
    574574            if (myParamMask->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) {
     575
    575576                P_PSMINIMIZATION_SET_MAXITER((&dummyMin),PS_MINIMIZE_POWELL_LINEMIN_MAX_ITERATIONS);
    576                 *(float*)&dummyMin.tol = PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE;
     577                P_PSMINIMIZATION_SET_MIN_TOL((&dummyMin),PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE);
     578
    577579                mul = LineMin(&dummyMin, Q, ((psVector *) v->data[i]),
    578580                              myParamMask, coords, func);
     
    677679
    678680        // 8: Go to step 3 until the change is less than some tolerance.
    679         if (fabs(baseFuncVal - currFuncVal) <= min->tol) {
     681        if (fabs(baseFuncVal - currFuncVal) <= min->minTol) {
    680682            psFree(v);
    681683            psFree(pQP);
Note: See TracChangeset for help on using the changeset viewer.