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.
    • 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 dx
      void evaluate(Datum P)
      get value and gradient for supplied point
      double[] 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
        Specified by:
        evaluate in interface Functionx
      • evaluate

        public double evaluate(double[] x,
                               double[] g)
        set argument to x, return value and put gradient in dx
        Specified by:
        evaluate in interface Functionx
      • projectUp

        protected void projectUp(double[] a,
                                 double[] b)
      • projectDown

        protected void projectDown(double[] a,
                                   double[] b)
      • dispose

        public void dispose()
        Specified by:
        dispose in interface Functionx