|
TPCCLIB
|
Check nonlinear fitting parameters against constraints. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpcextensions.h"#include "tpcrand.h"#include "tpcnlopt.h"Go to the source code of this file.
Functions | |
| unsigned int | nloptCheckParameters (unsigned int n, double *pLower, double *pUpper, double *p, double *pAccept, double *penalty) |
| Check that model parameters are within given limits. | |
| unsigned int | nloptForceLimits (unsigned int n, double *pLower, double *pUpper, double *p) |
| Enforce the model parameters within given limits. | |
Check nonlinear fitting parameters against constraints.
Definition in file constraints.c.
| unsigned int nloptCheckParameters | ( | unsigned int | n, |
| double * | pLower, | ||
| double * | pUpper, | ||
| double * | p, | ||
| double * | pAccept, | ||
| double * | penalty ) |
Check that model parameters are within given limits.
If one or more parameter(s) are outside of limits, then a penalty factor is optionally computed. Optionally, this function can make a list parameters that are inside the constraints.
| n | Nr of parameters. |
| pLower | Lower limits (array of length par_nr). |
| pUpper | Upper limits (array of length par_nr). |
| p | Parameters to test (array of length par_nr). |
| pAccept | Pointer to corrected parameters (array of length par_nr); NULL if not needed. |
| penalty | Pointer to variable in which the possible penalty factor will be written; 1.0 if no penalty was found is necessary, otherwise >1. Set to NULL if not needed. |
Definition at line 30 of file constraints.c.
| unsigned int nloptForceLimits | ( | unsigned int | n, |
| double * | pLower, | ||
| double * | pUpper, | ||
| double * | p ) |
Enforce the model parameters within given limits.
| n | Number of parameters. |
| pLower | Lower limits (array of length par_nr). |
| pUpper | Upper limits (array of length par_nr). |
| p | Parameters to enforce inside limits (array of length par_nr). |
Definition at line 76 of file constraints.c.
Referenced by nloptSimplex().