cct.math
Class LinearSearch
java.lang.Object
cct.math.LinearSearch
public class LinearSearch
- extends java.lang.Object
Title:
Description:
Adapted from the Numerical Recipes in C
Copyright: Copyright (c) 2006
Company: ANU
Field Summary |
(package private) double |
ALF
|
(package private) boolean |
debug
|
(package private) float |
fMin
|
(package private) double |
TOLX
|
Method Summary |
float |
getFMin()
|
boolean |
lnsrch(int n,
float[] xold,
float fold,
float[] g,
float[] p,
float[] x,
float stpmax,
MinimizedFunctionInterface func)
Given an n-dimensional point xold[1..n], the value of the function and gradient there, fold
and g[1..n], and a direction p[1..n], finds a new point x[1..n] along the direction p from
xold where the function func has decreased “sufficiently.” The new function value is returned
in f. |
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 |
ALF
double ALF
TOLX
double TOLX
fMin
float fMin
debug
boolean debug
LinearSearch
public LinearSearch()
lnsrch
public boolean lnsrch(int n,
float[] xold,
float fold,
float[] g,
float[] p,
float[] x,
float stpmax,
MinimizedFunctionInterface func)
- Given an n-dimensional point xold[1..n], the value of the function and gradient there, fold
and g[1..n], and a direction p[1..n], finds a new point x[1..n] along the direction p from
xold where the function func has decreased “sufficiently.” The new function value is returned
in f. stpmax is an input quantity that limits the length of the steps so that you do not try to
evaluate the function in regions where it is undefined or subject to overflow. p is usually the
Newton direction. The output quantity check is false (0) on a normal exit. It is true (1) when
x is too close to xold. In a minimization algorithm, this usually signals convergence and can
be ignored. However, in a zero-finding algorithm the calling program should check whether the
convergence is spurious. Some “difficult” problems may require double precision in this routine.
- Type Parameters:
any
- float- Parameters:
n
- intxold
- float[]fold
- floatg
- float[]p
- float[]x
- float[]
getFMin
public float getFMin()
main
public static void main(java.lang.String[] args)