00001 /* @file psMinimizePowell.c 00002 * @brief basic minimization functions 00003 * 00004 * This file will contain function prototypes for various Powell 00005 * chi-squared minimization routines. 00006 * 00007 * @author GLG, MHPCC 00008 * 00009 * @version $Revision: 1.5 $ $Name: $ 00010 * @date $Date: 2007/01/23 22:47:23 $ 00011 * 00012 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 00013 * 00014 */ 00015 00016 #ifndef PS_MINIMIZE_POWELL_H 00017 #define PS_MINIMIZE_POWELL_H 00018 00019 /// @addtogroup MathOps Mathematical Operations 00020 /// @{ 00021 00022 #include "psMinimizeLMM.h" 00023 #include "psVector.h" 00024 #include "psMemory.h" 00025 #include "psArray.h" 00026 #include "psImage.h" 00027 #include "psMatrix.h" 00028 #include "psPolynomial.h" 00029 #include "psSpline.h" 00030 #include "psStats.h" 00031 #include "psTrace.h" 00032 #include "psError.h" 00033 #include "psConstants.h" 00034 00035 /** Specifies the format of a user-defined function that the general Powell 00036 * minimizer routine will accept. 00037 * 00038 * @return float: the single float value of the function given the parameters 00039 * and coordinate vectors. 00040 */ 00041 typedef 00042 float (*psMinimizePowellFunc)( 00043 const psVector *params, ///< Parameters used to evaluate the function 00044 const psArray *coords ///< Coordinates at which to evaluate 00045 ); 00046 00047 /** Minimizes a specified function based on the Powell method. 00048 * 00049 * @return bool: True if successful. 00050 */ 00051 bool psMinimizePowell( 00052 psMinimization *min, ///< Minimization specification 00053 psVector *params, ///< "Best guess" for parameters that minimize func 00054 const psVector *paramMask, ///< Parameters to be held fixed by minimizer 00055 const psArray *coords, ///< Measurement coordinates 00056 psMinimizePowellFunc func ///< Specified function 00057 ); 00058 00059 /** Specifies the format of a user-defined function that the general Powell chi- 00060 * squared minimizer routine will accept. 00061 * 00062 * @return psVector*: Calculated values given the parameters and coordinates. 00063 */ 00064 typedef 00065 psVector *(*psMinimizeChi2PowellFunc)( 00066 const psVector *params, ///< Parameters used to evaluate the function 00067 const psArray *coords ///< Coordinates at which to evaluate 00068 ); 00069 00070 /** Minimizes a specified function based on the Powell chi-squared method. 00071 * 00072 * @return bool: True is successful. 00073 */ 00074 bool psMinimizeChi2Powell( 00075 psMinimization *min, ///< Minimization specification 00076 psVector *params, ///< "Best guess" for parameters that minimize func 00077 psMinConstraint *constraint, 00078 const psArray *coords, ///< Measurement coordinates 00079 const psVector *value, ///< Measured values at the coordinates 00080 const psVector *error, ///< Errors in the measure values (or NULL) 00081 psMinimizeChi2PowellFunc model ///< Specified function 00082 ); 00083 00084 /// @} 00085 #endif // #ifndef PS_MINIMIZE_POWELL_H
1.5.1