Changeset 6226 for trunk/psLib/src/math/psMinimizeLMM.c
- Timestamp:
- Jan 27, 2006, 10:08:58 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psMinimizeLMM.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMinimizeLMM.c
r6204 r6226 10 10 * @author EAM, IfA 11 11 * 12 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-01-2 6 21:10:22$12 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-01-27 20:08:58 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 277 277 NOTES: EAM: this is my re-implementation of MinLM 278 278 279 XXX: Must implement code to handle the constrain->min, ->max, ->delta members. 280 279 281 XXX: Put the ASSERTS in. 280 282 … … 283 285 will have to convert all F32 input vectors to F64 regardless. So, 284 286 the F64 port might be. 287 285 288 *****************************************************************************/ 286 289 psBool psMinimizeLMChi2( … … 288 291 psImage *covar, 289 292 psVector *params, 290 const psVector *paramMask,293 psMinConstrain *constrain, 291 294 const psArray *x, 292 295 const psVector *y, … … 300 303 PS_ASSERT_VECTOR_NON_EMPTY(params, false); 301 304 PS_ASSERT_VECTOR_TYPE(params, PS_TYPE_F32, false); 302 if (paramMask != NULL) { 303 PS_ASSERT_VECTOR_TYPE(paramMask, PS_TYPE_U8, false); 304 PS_ASSERT_VECTORS_SIZE_EQUAL(params, paramMask, false); 305 psVector *paramMask = NULL; 306 if (constrain != NULL) { 307 paramMask = constrain->paramMask; 308 if (paramMask != NULL) { 309 PS_ASSERT_VECTOR_TYPE(paramMask, PS_TYPE_U8, false); 310 PS_ASSERT_VECTORS_SIZE_EQUAL(params, paramMask, false); 311 } 312 if (constrain->paramMin != NULL) { 313 psLogMsg(__func__, PS_LOG_WARN, "WARNING: the constrain->paramMin vector is currently ignored.\n"); 314 } 315 if (constrain->paramMax != NULL) { 316 psLogMsg(__func__, PS_LOG_WARN, "WARNING: the constrain->paramMax vector is currently ignored.\n"); 317 } 318 if (constrain->paramDelta != NULL) { 319 psLogMsg(__func__, PS_LOG_WARN, "WARNING: the constrain->paramDelta vector is currently ignored.\n"); 320 } 305 321 } 306 322 PS_ASSERT_PTR_NON_NULL(x, false); … … 592 608 return( psMemGetDeallocator(ptr) == (psFreeFunc)minimizationFree ); 593 609 } 610 611 612 static void constrainFree(psMinConstrain *tmp) 613 { 614 // There are no dynamically allocated items 615 } 616 617 psMinConstrain* psMinConstrainAlloc() 618 { 619 psMinConstrain *tmp = psAlloc(sizeof(psMinConstrain)); 620 tmp->paramMask = NULL; 621 tmp->paramMax = NULL; 622 tmp->paramMin = NULL; 623 tmp->paramDelta = NULL; 624 625 return(tmp); 626 } 627 628 bool psMemCheckConstrain(psPtr tmp) 629 { 630 return( psMemGetDeallocator(tmp) == (psFreeFunc)constrainFree ); 631 }
Note:
See TracChangeset
for help on using the changeset viewer.
