cct.math
Class Amoeba

java.lang.Object
  extended by cct.math.Amoeba

public class Amoeba
extends java.lang.Object

Title:

Description:

Copyright: Copyright (c) 2006

Company: ANU


Field Summary
(package private)  float Fmin
           
(package private)  float gamma
           
(package private)  int nfunk
           
(package private)  int NMAX
           
(package private)  float[][] p
           
(package private)  boolean print
           
(package private)  float[] psum
           
(package private)  float[] ptry
           
(package private)  float TINY
           
(package private)  float[] y
           
 
Constructor Summary
Amoeba()
           
 
Method Summary
 int amoeba(float[] x, int ndim, float ftol, MinimizedFunctionInterface func)
          Multidimensional minimization of the function func(x) where x[ndim] is a vector in ndim dimensions, by the downhill simplex method of Nelder and Mead.
(package private)  float amotry(float[][] p, float[] y, float[] psum, int ndim, MinimizedFunctionInterface func, int ihi, float fac)
          Extrapolates by a factor fac through the face of the simplex across from the high point, tries it, and replaces the high point if the new point is better.
(package private)  void GET_PSUM(int ndim)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TINY

float TINY

gamma

float gamma

NMAX

int NMAX

nfunk

int nfunk

psum

float[] psum

p

float[][] p

y

float[] y

ptry

float[] ptry

print

boolean print

Fmin

float Fmin
Constructor Detail

Amoeba

public Amoeba()
Method Detail

GET_PSUM

void GET_PSUM(int ndim)

amoeba

public int amoeba(float[] x,
                  int ndim,
                  float ftol,
                  MinimizedFunctionInterface func)
Multidimensional minimization of the function func(x) where x[ndim] is a vector in ndim dimensions, by the downhill simplex method of Nelder and Mead. The matrix p[ndim+1] [ndim] is input. Its ndim+1 rows are ndim-dimensional vectors which are the vertices of the starting simplex. Also input is the vector y[ndim+1], whose components must be preinitialized to the values of func evaluated at the ndim+1 vertices (rows) of p; and ftol the fractional convergence tolerance to be achieved in the function value (n.b.!). On output, p and y will have been reset to ndim+1 new points all within ftol of a minimum function value, and nfunk gives the number of function evaluations taken.

Type Parameters:
any - float

amotry

float amotry(float[][] p,
             float[] y,
             float[] psum,
             int ndim,
             MinimizedFunctionInterface func,
             int ihi,
             float fac)
Extrapolates by a factor fac through the face of the simplex across from the high point, tries it, and replaces the high point if the new point is better.

Type Parameters:
any - float
Parameters:
p - float[][]
y - float[]
psum - float[]
ndim - int
Returns:
float

main

public static void main(java.lang.String[] args)