Class NMSimplex


  • public abstract class NMSimplex
    extends java.lang.Object
    Example public class Objfunc implements Objfun { public double evalObjfun(double x[]){ return (100*(x[1]-x[0]*x[0])*(x[1]-x[0]*x[0])+(1.0-x[0])*(1.0-x[0])); } } public class Constraint implements Constraints { double round2(double num, int precision) { double rnum; int tnum; rnum = num*Math.pow(10,precision); tnum = (int)(rnum < 0 ? rnum-0.5 : rnum + 0.5); rnum = tnum/Math.pow(10,precision); return rnum; } public void getConstrainedValues(double x[], int n) { // round to 2 decimal places int i; for (i=0; i
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static double ALPHA  
      (package private) static double BETA  
      private boolean display  
      private double EPSILON  
      (package private) static double GAMMA  
      (package private) static int MAX_IT  
      private int n  
      private double scale  
      private double[] start  
    • Constructor Summary

      Constructors 
      Constructor Description
      NMSimplex​(double[] start, int n, double EPSILON, double scale, boolean display)  
    • Constructor Detail

      • NMSimplex

        public NMSimplex​(double[] start,
                         int n,
                         double EPSILON,
                         double scale,
                         boolean display)
    • Method Detail

      • driver

        public void driver()
      • getConstrainedValues

        public abstract void getConstrainedValues​(double[] x,
                                                  int n)
      • evalObjfun

        public abstract double evalObjfun​(double[] x)