|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.math.LineFunction
public class LineFunction
converts a multivariate function into a univariate function
Constructor Summary | |
---|---|
LineFunction(MultivariateFunction func)
construct univariate function from multivariate function |
Method Summary | |
---|---|
int |
checkDirection(double[] p,
double[] dir)
check direction vector. |
boolean |
checkPoint(double[] p)
check (and modify, if necessary) whether a point lies properly within the predefined bounds |
int |
checkVariables(double[] p,
double[] grad,
boolean[] active)
determine active variables at a point p and corresponding gradient grad (if a component of p lies on a border and the corresponding component of the gradient points out of the border the variable is considered inactive) |
double |
evaluate(double lambda)
evaluate f(start+lambda*dir) |
double |
findMinimum()
find parameter lambda within the given bounds that minimizes the univariate function (due to numerical inaccuaries it may happen that getPoint for the returned lambda produces a point that lies slightly out of bounds) |
double |
getLowerBound()
get lower bound of argument |
int |
getLowerBoundParameter()
get parameter that limits the lower bound |
void |
getPoint(double lambda,
double[] p)
get point associated with the one-dimensional parameter (bounds of of multivariate function are NOT checked) |
double |
getUpperBound()
get upper bound of argument |
int |
getUpperBoundParameter()
get parameter that limits the upper bound |
void |
update(double[] start,
double[] dir)
update start point and direction (bounds and search direction are NOT checked) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineFunction(MultivariateFunction func)
func
- multivariate functionstart
- start pointdir
- direction vectorMethod Detail |
---|
public void update(double[] start, double[] dir)
start
- new start pointdir
- new direction vectorpublic void getPoint(double lambda, double[] p)
lambda
- argumentp
- array for coordinates of corresponding pointpublic double evaluate(double lambda)
evaluate
in interface UnivariateFunction
public double getLowerBound()
UnivariateFunction
getLowerBound
in interface UnivariateFunction
public double getUpperBound()
UnivariateFunction
getUpperBound
in interface UnivariateFunction
public double findMinimum()
public int getUpperBoundParameter()
public int getLowerBoundParameter()
public boolean checkPoint(double[] p)
p
- coordinates of point
public int checkVariables(double[] p, double[] grad, boolean[] active)
p
- coordinates of pointgrad
- gradient at that pointlist
- of active variables (on return)
public int checkDirection(double[] p, double[] dir)
p
- coordinates of pointdir
- direction vector at that point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |