libtpcmodel
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Functions | Variables
simplex.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "include/simplex.h"
Include dependency graph for simplex.c:

Go to the source code of this file.

Functions

void _simplexGenNew (int M, double F)
double simplex (double(*_fun)(double *), int parNr, double *par, double *delta, double maxerr, int maxiter)

Variables

int _simplexParNr
int Worst
int NewPnt
double _simplexP [MAX_PARAMETERS+3][MAX_PARAMETERS]
double _simplexC [MAX_PARAMETERS]
double _simplexR [MAX_PARAMETERS+3]
double(* _simplexFunc )(double *)

Function Documentation

void _simplexGenNew ( int  M,
double  F 
)

Local functions

Definition at line 168 of file simplex.c.

References _simplexC, _simplexP, _simplexParNr, _simplexR, M, NewPnt, and Worst.

Referenced by simplex().

double simplex ( double(*)(double *)  _fun,
int  parNr,
double *  par,
double *  delta,
double  maxerr,
int  maxiter 
)

Simplex function minimization routine. Note that if any constraints are required for the parameter values they must be set in the function.

Returns:
Function returns the least calculated value of func.
Parameters:
_funPointer to the function to be minimized. It must be defined in main program as: double func(double *p); where p is the parameter array.
parNrThe number of unknown parameters
parThis double array contains the minimized parameters. Initial values must be set.
deltaThis double array contains the initial changes to parameters. To fix a parameter, set the corresponding delta to 0.
maxerrMaximal error allowed (stopping rule #1)
maxiterMaximal nr of iterations allowed (stopping rule #2)

Definition at line 52 of file simplex.c.

References _simplexC, _simplexFunc, _simplexGenNew(), _simplexP, _simplexParNr, _simplexR, NewPnt, SIMPLEX_TEST, and Worst.

Here is the call graph for this function:


Variable Documentation

Definition at line 41 of file simplex.c.

Referenced by _simplexGenNew(), and simplex().

double(* _simplexFunc)(double *)

Definition at line 43 of file simplex.c.

Referenced by simplex().

Definition at line 41 of file simplex.c.

Referenced by _simplexGenNew(), and simplex().

Local variables for this routine

Definition at line 40 of file simplex.c.

Referenced by _simplexGenNew(), and simplex().

Definition at line 41 of file simplex.c.

Referenced by _simplexGenNew(), and simplex().

int NewPnt

Definition at line 40 of file simplex.c.

Referenced by _simplexGenNew(), and simplex().

int Worst

Definition at line 40 of file simplex.c.

Referenced by _simplexGenNew(), and simplex().