protected AbstractSimplex(final double[] steps){
  if (steps == null) {
    throw new NullArgumentException();
  }
  if (steps.length == 0) {
    throw new MathIllegalArgumentException(LocalizedCoreFormats.ZERO_NOT_ALLOWED);
  }
  dimension=steps.length;
  startConfiguration=new double[dimension][dimension];
  for (int i=0; i < dimension; i++) {
    final double[] vertexI=startConfiguration[i];
    for (int j=0; j < i + 1; j++) {
      if (steps[j] == 0) {
        throw new MathIllegalArgumentException(LocalizedOptimFormats.EQUAL_VERTICES_IN_SIMPLEX);
      }
      System.arraycopy(steps,0,vertexI,0,j + 1);
    }
  }
}

protected AbstractSimplex ( final double [ ] steps ) { if ( steps == null ) { throw new NullArgumentException ( ) ; } if ( steps . length == 0 ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . ZERO_NOT_ALLOWED ) ; } dimension = steps . length ; startConfiguration = new double [ dimension ] [ dimension ] ; for ( int i = 0 ; i < dimension ; i ++ ) { final double [ ] vertexI = startConfiguration [ i ] ; for ( int j = 0 ; j < i + 1 ; j ++ ) { if ( steps [ j ] == 0 ) { throw new MathIllegalArgumentException ( LocalizedOptimFormats . EQUAL_VERTICES_IN_SIMPLEX ) ; } System . arraycopy ( steps , 0 , vertexI , 0 , j + 1 ) ; } } }
the start configuration for simplex is built from a box parallel to the canonical axes of the space . the simplex is the subset of vertices of a box parallel to the canonical axes . it is built as the path followed while traveling from one vertex of the box to the diagonally opposite vertex moving only along the box edges . the first vertex of the box will be located at the start point of the optimization . as an example , in dimension 3 a simplex has 4 vertices . setting the steps to ( 1 , 10 , 2 ) and the start point to ( 1 , 1 , 1 ) would imply the start simplex would be : { ( 1 , 1 , 1 ) , ( 2 , 1 , 1 ) , ( 2 , 11 , 1 ) , ( 2 , 11 , 3 ) } . the first vertex would be set to the start point at ( 1 , 1 , 1 ) and the last vertex would be set to the diagonally opposite vertex at ( 2 , 11 , 3 ) .
