LCFIPlus  0.6.5
Namespaces | Macros | Functions | Variables
algo.h File Reference
#include <math.h>
#include <stdio.h>
#include <vector>
#include <iostream>

Go to the source code of this file.

Namespaces

 lcfiplus
 

Macros

#define SHFT(a, b, c, d)   (a)=(b);(b)=(c);(c)=(d);
 
#define SHFT2(a, b, c)   (a)=(b);(b)=(c);
 
#define SHFT3(a, b, c, d)   (a)=(b);(b)=(c);(c)=(d);
 
#define SIGN(a, b)   ((b)>=0.0 ? fabs(a) : -fabs(a))
 
#define MOV3(a, b, c, d, e, f)   (a)=(d);(b)=(e);(c)=(f);
 
#define FMAX(a, b)   (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ? (maxarg1) : (maxarg2))
 
#define FMAX(a, b)   (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ? (maxarg1) : (maxarg2))
 

Functions

template<class T >
double lcfiplus::golden (double ax, double bx, double cx, T *obj, double tol, double &xmin)
 
template<class T >
double lcfiplus::brent (double ax, double bx, double cx, T *obj, double tol, double &xmin)
 
template<class T , class U >
double lcfiplus::dbrent (double ax, double bx, double cx, T *obj, U *dobj, double tol, double &xmin)
 
template<class T >
void lcfiplus::lnsrch (int n, double xold[], double fold, double g[], double p[], double x[], double *f, double stpmax, int *check, T *obj)
 
template<class T , class U >
void lcfiplus::dfpmin (double p[], int n, double gtol, int *iter, double *fret, T *obj, U *dobj)
 

Variables

const double lcfiplus::R =0.61803399
 
const double lcfiplus::C =(1.0-R)
 
const double lcfiplus::GOLD =1.618034
 
const double lcfiplus::GLIMIT =100.0
 
const double lcfiplus::TINY =1.e-25
 
const double lcfiplus::CGOLD =0.3819660
 
const double lcfiplus::ZEPS = 1e-20
 
const int lcfiplus::ITMAX =200
 

Macro Definition Documentation

#define FMAX (   a,
 
)    (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ? (maxarg1) : (maxarg2))
#define FMAX (   a,
 
)    (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ? (maxarg1) : (maxarg2))
#define MOV3 (   a,
  b,
  c,
  d,
  e,
 
)    (a)=(d);(b)=(e);(c)=(f);

Referenced by lcfiplus::dbrent().

#define SHFT (   a,
  b,
  c,
 
)    (a)=(b);(b)=(c);(c)=(d);
#define SHFT2 (   a,
  b,
 
)    (a)=(b);(b)=(c);

Referenced by lcfiplus::golden().

#define SHFT3 (   a,
  b,
  c,
 
)    (a)=(b);(b)=(c);(c)=(d);

Referenced by lcfiplus::golden().

#define SIGN (   a,
 
)    ((b)>=0.0 ? fabs(a) : -fabs(a))