#include "cddefines.h"
#include "optimize.h"
Go to the source code of this file.
Data Structures | |
struct | t_usubc |
struct | t_isubc |
Defines | |
#define | S(I_, J_) (*(s+(I_)*(ns)+(J_))) |
#define | S(I_, J_) (*(s+(I_)*(ns)+(J_))) |
#define | S(I_, J_) (*(s+(I_)*(ns)+(J_))) |
Functions | |
static void | calcc (long, float *, long, long, int, float[]) |
static double | cdasum (long, float[], long) |
static void | cdaxpy (long, double, float[], long, float[], long) |
static void | cdcopy (long, float[], long, float[], long) |
static void | csscal (long, double, float[], long) |
static double | dist (long, float[], float[]) |
static void | evalf (long, long[], float[], long, float[], float *, long *) |
static void | fstats (double, long, int) |
static void | newpt (long, double, float[], float[], int, float[], int *) |
static void | order (long, float[], long *, long *, long *) |
static void | partx (long, long[], float[], long *, long[]) |
static void | setstp (long, long, float[], float[]) |
static void | simplx (long, float[], long, long[], long, int, float[], float *, long *, float *, float[], long *) |
static void | sortd (long, float[], long[]) |
static void | start (long, float[], float[], long, long[], float *, int *) |
static void | subopt (long) |
void | optimize_subplex (long int n, double tol, long int maxnfe, long int mode, float scale[], float x[], float *fx, long int *nfe, float work[], long int iwork[], long int *iflag) |
static void | subopt (long int n) |
static void | cdcopy (long int n, float dx[], long int incx, float dy[], long int incy) |
static void | evalf (long int ns, long int ips[], float xs[], long int n, float x[], float *sfx, long int *nfe) |
static void | setstp (long int nsubs, long int n, float deltax[], float step[]) |
static void | sortd (long int n, float xkey[], long int ix[]) |
static void | partx (long int n, long int ip[], float absdx[], long int *nsubs, long int nsvals[]) |
static void | simplx (long int n, float step[], long int ns, long int ips[], long int maxnfe, int cmode, float x[], float *fx, long int *nfe, float *s, float fs[], long int *iflag) |
static void | fstats (double fx, long int ifxwt, int reset) |
static double | cdasum (long int n, float dx[], long int incx) |
static void | csscal (long int n, double da, float dx[], long int incx) |
static void | start (long int n, float x[], float step[], long int ns, long int ips[], float *s, int *small) |
static void | order (long int npts, float fs[], long int *il, long int *is, long int *ih) |
static double | dist (long int n, float x[], float y[]) |
static void | calcc (long int ns, float *s, long int ih, long int inew, int updatc, float c[]) |
static void | newpt (long int ns, double coef, float xbase[], float xold[], int IntNew, float xnew[], int *small) |
static void | cdaxpy (long int n, double da, float dx[], long int incx, float dy[], long int incy) |
Variables | |
struct t_usubc | usubc |
struct t_isubc | isubc |
#define S | ( | I_, | |||
J_ | ) | (*(s+(I_)*(ns)+(J_))) |
Definition at line 1880 of file optimize_subplx.cpp.
#define S | ( | I_, | |||
J_ | ) | (*(s+(I_)*(ns)+(J_))) |
Definition at line 1880 of file optimize_subplx.cpp.
#define S | ( | I_, | |||
J_ | ) | (*(s+(I_)*(ns)+(J_))) |
static void calcc | ( | long int | ns, | |
float * | s, | |||
long int | ih, | |||
long int | inew, | |||
int | updatc, | |||
float | c[] | |||
) | [static] |
Definition at line 1882 of file optimize_subplx.cpp.
References cdaxpy(), cdcopy(), csscal(), DEBUG_ENTRY, DEBUG_EXIT, and S.
static void calcc | ( | long | , | |
float * | , | |||
long | , | |||
long | , | |||
int | , | |||
float | [] | |||
) | [static] |
Referenced by simplx().
static double cdasum | ( | long int | n, | |
float | dx[], | |||
long int | incx | |||
) | [static] |
static double cdasum | ( | long | , | |
float | [], | |||
long | ||||
) | [static] |
Referenced by setstp().
static void cdaxpy | ( | long int | n, | |
double | da, | |||
float | dx[], | |||
long int | incx, | |||
float | dy[], | |||
long int | incy | |||
) | [static] |
static void cdaxpy | ( | long | , | |
double | , | |||
float | [], | |||
long | , | |||
float | [], | |||
long | ||||
) | [static] |
Referenced by calcc().
static void cdcopy | ( | long int | n, | |
float | dx[], | |||
long int | incx, | |||
float | dy[], | |||
long int | incy | |||
) | [static] |
static void cdcopy | ( | long | , | |
float | [], | |||
long | , | |||
float | [], | |||
long | ||||
) | [static] |
Referenced by calcc(), optimize_subplex(), simplx(), and start().
static void csscal | ( | long int | n, | |
double | da, | |||
float | dx[], | |||
long int | incx | |||
) | [static] |
static double dist | ( | long int | n, | |
float | x[], | |||
float | y[] | |||
) | [static] |
static double dist | ( | long | , | |
float | [], | |||
float | [] | |||
) | [static] |
Referenced by simplx().
static void evalf | ( | long int | ns, | |
long int | ips[], | |||
float | xs[], | |||
long int | n, | |||
float | x[], | |||
float * | sfx, | |||
long int * | nfe | |||
) | [static] |
Definition at line 712 of file optimize_subplx.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, t_isubc::fbonus, fstats(), t_usubc::ftest, t_usubc::fxstat, t_usubc::ifxsw, t_usubc::initx, t_isubc::IntNew, t_usubc::irepl, isubc, t_usubc::minf, t_usubc::newx, optimize_func(), t_isubc::sfbest, and usubc.
static void evalf | ( | long | , | |
long | [], | |||
float | [], | |||
long | , | |||
float | [], | |||
float * | , | |||
long * | ||||
) | [static] |
Referenced by optimize_subplex(), and simplx().
static void fstats | ( | double | fx, | |
long int | ifxwt, | |||
int | reset | |||
) | [static] |
Definition at line 1409 of file optimize_subplx.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, t_usubc::fxstat, MAX2, MAX3, MIN2, t_usubc::nfxe, POW2, and usubc.
static void fstats | ( | double | , | |
long | , | |||
int | ||||
) | [static] |
Referenced by evalf().
static void newpt | ( | long int | ns, | |
double | coef, | |||
float | xbase[], | |||
float | xold[], | |||
int | IntNew, | |||
float | xnew[], | |||
int * | small | |||
) | [static] |
static void newpt | ( | long | , | |
double | , | |||
float | [], | |||
float | [], | |||
int | , | |||
float | [], | |||
int * | ||||
) | [static] |
Referenced by simplx().
void optimize_subplex | ( | long int | n, | |
double | tol, | |||
long int | maxnfe, | |||
long int | mode, | |||
float | scale[], | |||
float | x[], | |||
float * | fx, | |||
long int * | nfe, | |||
float | work[], | |||
long int | iwork[], | |||
long int * | iflag | |||
) |
optimize_subplex is the main driver, and only exposed, routine for the cowan downhill simplex routine
n | ||
tol | ||
maxnfe | ||
mode | ||
scale[] | ||
x[] | ||
*fx | ||
*nfe | ||
work[] | ||
iwork[] | ||
*iflag |
Definition at line 65 of file optimize_subplx.cpp.
References t_usubc::alpha, t_usubc::beta, t_usubc::bonus, cdcopy(), DEBUG_ENTRY, DEBUG_EXIT, t_usubc::delta, evalf(), t_isubc::fbonus, t_usubc::fstop, t_usubc::ftest, t_usubc::gamma, t_usubc::ifxsw, t_usubc::initx, t_isubc::IntNew, t_usubc::irepl, isubc, MAX2, t_usubc::minf, t_usubc::nfstop, t_usubc::nfxe, t_usubc::nsmax, t_usubc::nsmin, t_usubc::omega, partx(), POW2, t_usubc::psi, setstp(), t_isubc::sfstop, simplx(), sortd(), subopt(), and usubc.
Referenced by lgOptimize_do().
static void order | ( | long int | npts, | |
float | fs[], | |||
long int * | il, | |||
long int * | is, | |||
long int * | ih | |||
) | [static] |
static void order | ( | long | , | |
float | [], | |||
long * | , | |||
long * | , | |||
long * | ||||
) | [static] |
Referenced by simplx().
static void partx | ( | long int | n, | |
long int | ip[], | |||
float | absdx[], | |||
long int * | nsubs, | |||
long int | nsvals[] | |||
) | [static] |
Definition at line 1011 of file optimize_subplx.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, MIN2, t_usubc::nsmax, t_usubc::nsmin, and usubc.
static void partx | ( | long | , | |
long | [], | |||
float | [], | |||
long * | , | |||
long | [] | |||
) | [static] |
Referenced by optimize_subplex().
static void setstp | ( | long int | nsubs, | |
long int | n, | |||
float | deltax[], | |||
float | step[] | |||
) | [static] |
Definition at line 843 of file optimize_subplx.cpp.
References cdasum(), csscal(), DEBUG_ENTRY, DEBUG_EXIT, MAX2, MIN2, t_usubc::omega, t_usubc::psi, sign(), and usubc.
static void setstp | ( | long | , | |
long | , | |||
float | [], | |||
float | [] | |||
) | [static] |
Referenced by optimize_subplex().
static void simplx | ( | long int | n, | |
float | step[], | |||
long int | ns, | |||
long int | ips[], | |||
long int | maxnfe, | |||
int | cmode, | |||
float | x[], | |||
float * | fx, | |||
long int * | nfe, | |||
float * | s, | |||
float | fs[], | |||
long int * | iflag | |||
) | [static] |
Definition at line 1133 of file optimize_subplx.cpp.
References t_usubc::alpha, t_usubc::beta, calcc(), cdcopy(), DEBUG_ENTRY, DEBUG_EXIT, t_usubc::delta, dist(), evalf(), fe, t_usubc::gamma, t_isubc::IntNew, t_usubc::irepl, isubc, MIN2, newpt(), t_usubc::nfstop, t_usubc::nfxe, order(), t_usubc::psi, S, t_isubc::sfbest, t_isubc::sfstop, start(), and usubc.
static void simplx | ( | long | , | |
float | [], | |||
long | , | |||
long | [], | |||
long | , | |||
int | , | |||
float | [], | |||
float * | , | |||
long * | , | |||
float * | , | |||
float | [], | |||
long * | ||||
) | [static] |
Referenced by optimize_subplex().
static void sortd | ( | long int | n, | |
float | xkey[], | |||
long int | ix[] | |||
) | [static] |
static void sortd | ( | long | , | |
float | [], | |||
long | [] | |||
) | [static] |
Referenced by optimize_subplex().
static void start | ( | long int | n, | |
float | x[], | |||
float | step[], | |||
long int | ns, | |||
long int | ips[], | |||
float * | s, | |||
int * | small | |||
) | [static] |
Definition at line 1631 of file optimize_subplx.cpp.
References cdcopy(), DEBUG_ENTRY, DEBUG_EXIT, and S.
static void start | ( | long | , | |
float | [], | |||
float | [], | |||
long | , | |||
long | [], | |||
float * | , | |||
int * | ||||
) | [static] |
Referenced by simplx().
static void subopt | ( | long int | n | ) | [static] |
Definition at line 460 of file optimize_subplx.cpp.
References t_usubc::alpha, t_usubc::beta, t_usubc::bonus, DEBUG_ENTRY, DEBUG_EXIT, t_usubc::delta, t_usubc::gamma, t_usubc::ifxsw, t_usubc::irepl, MIN2, t_usubc::minf, t_usubc::nfstop, t_usubc::nsmax, t_usubc::nsmin, t_usubc::omega, t_usubc::psi, and usubc.
static void subopt | ( | long | ) | [static] |
Referenced by optimize_subplex().
Referenced by evalf(), optimize_subplex(), and simplx().