optimize_subplx.cpp File Reference

#include "cddefines.h"
#include "optimize.h"

Include dependency graph for optimize_subplx.cpp:

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 Documentation

#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_)))

Definition at line 1880 of file optimize_subplx.cpp.

Referenced by calcc(), simplx(), and start().


Function Documentation

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.

Here is the call graph for this function:

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]

Definition at line 1475 of file optimize_subplx.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

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]

Definition at line 2060 of file optimize_subplx.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

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]

Definition at line 635 of file optimize_subplx.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

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]

Definition at line 1549 of file optimize_subplx.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

static void csscal ( long  ,
double  ,
float  [],
long   
) [static]

Referenced by calcc(), and setstp().

static double dist ( long int  n,
float  x[],
float  y[] 
) [static]

Definition at line 1806 of file optimize_subplx.cpp.

References DEBUG_ENTRY, DEBUG_EXIT, and POW2.

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]

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]

Definition at line 1963 of file optimize_subplx.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

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

Parameters:
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().

Here is the call graph for this function:

static void order ( long int  npts,
float  fs[],
long int *  il,
long int *  is,
long int *  ih 
) [static]

Definition at line 1723 of file optimize_subplx.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

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.

Here is the call graph for this function:

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]

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]

Definition at line 928 of file optimize_subplx.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

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.

Here is the call graph for this function:

static void start ( long  ,
float  [],
float  [],
long  ,
long  [],
float *  ,
int *   
) [static]

Referenced by simplx().

static void subopt ( long int  n  )  [static]

static void subopt ( long   )  [static]

Referenced by optimize_subplex().


Variable Documentation

struct t_isubc isubc

Referenced by evalf(), optimize_subplex(), and simplx().

struct t_usubc usubc


Generated for cloudy by doxygen 1.5.9