Package samer.maths.opt
Class SubspaceFunctionx
- java.lang.Object
-
- samer.maths.opt.SubspaceFunctionx
-
- All Implemented Interfaces:
- Functionx
public class SubspaceFunctionx extends java.lang.Object implements Functionx
This is a function interface that is designed to allow efficient implementations of minimisation algorithms by recognising the fact that the function and its gradient may be repeatedly evaluated at the same point in different parts of the code - hence we can save ourselves some computation.
-
-
Constructor Summary
Constructors Constructor and Description SubspaceFunctionx(Functionx fn, int n, int m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
dispose()
double
evaluate(double[] x, double[] g)
set argument to x, return value and put gradient in dxvoid
evaluate(Datum P)
get value and gradient for supplied pointdouble[]
getX()
protected void
projectDown(double[] a, double[] b)
protected void
projectUp(double[] a, double[] b)
void
setMap(int i, int j)
means ith coor in little space maps to jth coor in big space
-
-
-
Constructor Detail
-
SubspaceFunctionx
public SubspaceFunctionx(Functionx fn, int n, int m)
-
-
Method Detail
-
setMap
public void setMap(int i, int j)
means ith coor in little space maps to jth coor in big space
-
getX
public double[] getX()
-
evaluate
public void evaluate(Datum P)
get value and gradient for supplied point
-
evaluate
public double evaluate(double[] x, double[] g)
set argument to x, return value and put gradient in dx
-
projectUp
protected void projectUp(double[] a, double[] b)
-
projectDown
protected void projectDown(double[] a, double[] b)
-
-