Changeset 28998 for trunk/psLib/src/math/psMinimizePowell.c
- Timestamp:
- Aug 20, 2010, 11:47:48 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psMinimizePowell.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMinimizePowell.c
r28635 r28998 457 457 458 458 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)) { 460 460 PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, params, mul); 461 461 min->value = func(params, coords); … … 524 524 psTrace("psLib.math", 4, "---- psMinimizePowell() begin ----\n"); 525 525 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); 527 527 528 528 if (paramMask == NULL) { … … 573 573 for (i=0;i<numDims;i++) { 574 574 if (myParamMask->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) { 575 575 576 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 577 579 mul = LineMin(&dummyMin, Q, ((psVector *) v->data[i]), 578 580 myParamMask, coords, func); … … 677 679 678 680 // 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) { 680 682 psFree(v); 681 683 psFree(pQP);
Note:
See TracChangeset
for help on using the changeset viewer.
