Changeset 8245 for trunk/psLib/src/math/psMinimizeLMM.c
- Timestamp:
- Aug 8, 2006, 4:26:44 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psMinimizeLMM.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMinimizeLMM.c
r7914 r8245 10 10 * @author EAM, IfA 11 11 * 12 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 7-15 02:57:12$12 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-09 02:26:44 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 71 71 72 72 // LU decomposition version 73 psTrace( __func__, 5, "using LUD version\n");73 psTrace("psLib.math", 5, "using LUD version\n"); 74 74 75 75 // set new guess values (creates matrix A) … … 103 103 # else 104 104 // gauss-jordan version 105 psTrace( __func__, 5, "using Gauss-J version");105 psTrace("psLib.math", 5, "using Gauss-J version"); 106 106 107 107 // set new guess values (creates matrix A) … … 158 158 psMinimizeLMChi2Func func) 159 159 { 160 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);160 psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__); 161 161 // allocate internal arrays (current vs Guess) 162 162 psImage *alpha = psImageAlloc (params->n, params->n, PS_TYPE_F64); … … 184 184 rc = false; 185 185 } 186 psTrace( __func__, 5, "p_psMinLM_SetABX() was succesful\n", __func__);186 psTrace("psLib.math", 5, "p_psMinLM_SetABX() was succesful\n", __func__); 187 187 188 188 psBool rcBool = p_psMinLM_GuessABP(Alpha, delta, Params, alpha, beta, params, paramMask, NULL, NULL, NULL, 0.0); … … 191 191 rc = false; 192 192 } 193 psTrace( __func__, 5, "p_psMinLM_GuessABP() was succesful\n", __func__);193 psTrace("psLib.math", 5, "p_psMinLM_GuessABP() was succesful\n", __func__); 194 194 195 195 psFree(alpha); … … 200 200 psFree(dy); 201 201 } 202 psTrace( __func__, 3, "---- %s() end ----\n", __func__);202 psTrace("psLib.math", 3, "---- %s() end ----\n", __func__); 203 203 return(rc); 204 204 } … … 335 335 psMinimizeLMChi2Func func) 336 336 { 337 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);337 psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__); 338 338 PS_ASSERT_PTR_NON_NULL(min, false); 339 339 // XXX: If covar not NULL, do asserts... … … 415 415 } 416 416 if (psTraceGetLevel (__func__) >= 6) { 417 psTrace( __func__, 6, "The current Param vector: \n");417 psTrace("psLib.math", 6, "The current Param vector: \n"); 418 418 for (psS32 i = 0 ; i < Params->n ; i++) { 419 psTrace( __func__, 6, "Params[%d] is %f\n", Params->data.F32[i]);419 psTrace("psLib.math", 6, "Params[%d] is %f\n", Params->data.F32[i]); 420 420 } 421 421 } … … 423 423 // iterate until the tolerance is reached, or give up 424 424 while ((min->iter < min->maxIter) && ((min->lastDelta > min->tol) || !isfinite(min->lastDelta))) { 425 psTrace( __func__, 5, "Iteration number %d. (max iterations is %d).\n", min->iter, min->maxIter);426 psTrace( __func__, 5, "Last delta is %f. Min->tol is %f.\n", min->lastDelta, min->tol);425 psTrace("psLib.math", 5, "Iteration number %d. (max iterations is %d).\n", min->iter, min->maxIter); 426 psTrace("psLib.math", 5, "Last delta is %f. Min->tol is %f.\n", min->lastDelta, min->tol); 427 427 428 428 // set a new guess for Alpha, Beta, Params … … 445 445 if (psTraceGetLevel(__func__) >= 6) { 446 446 if (psTraceGetLevel (__func__) >= 6) { 447 psTrace( __func__, 6, "The current Param vector: \n");447 psTrace("psLib.math", 6, "The current Param vector: \n"); 448 448 for (psS32 i = 0 ; i < Params->n ; i++) { 449 psTrace( __func__, 6, "Params[%d] is %f\n", Params->data.F32[i]);449 psTrace("psLib.math", 6, "Params[%d] is %f\n", Params->data.F32[i]); 450 450 } 451 451 } … … 466 466 psF64 rho = (min->value - Chisq) / dLinear; 467 467 468 psTrace( __func__, 5, "last chisq: %f, new chisq %f, delta: %f, rho: %f\n", min->value,468 psTrace("psLib.math", 5, "last chisq: %f, new chisq %f, delta: %f, rho: %f\n", min->value, 469 469 Chisq, min->lastDelta, rho); 470 470 … … 489 489 min->iter++; 490 490 } 491 psTrace( __func__, 5, "chisq: %f, last delta: %f, Niter: %d\n", min->value, min->lastDelta, min->iter);491 psTrace("psLib.math", 5, "chisq: %f, last delta: %f, Niter: %d\n", min->value, min->lastDelta, min->iter); 492 492 493 493 // construct & return the covariance matrix (if requested) … … 509 509 } 510 510 if (min->iter == min->maxIter) { 511 psTrace( __func__, 3, "---- %s(false) end ----\n", __func__);511 psTrace("psLib.math", 3, "---- %s(false) end ----\n", __func__); 512 512 return(false); 513 513 } 514 psTrace( __func__, 3, "---- %s(true) end ----\n", __func__);514 psTrace("psLib.math", 3, "---- %s(true) end ----\n", __func__); 515 515 return(true); 516 516 }
Note:
See TracChangeset
for help on using the changeset viewer.
