sqrt is bad for negative functions

This commit is contained in:
Marcel Kronfeld
2008-06-05 16:36:27 +00:00
parent defdbbbcdb
commit 446b67ead0

View File

@@ -223,7 +223,7 @@ public abstract class AbstractProblemDouble extends AbstractOptimizationProblem
double x[] = new double[getProblemDimension()]; double x[] = new double[getProblemDimension()];
for (int i=0; i<point.length; i++) x[i]=point[i]; for (int i=0; i<point.length; i++) x[i]=point[i];
for (int i=point.length; i<x.length; i++) x[i] = 0; for (int i=point.length; i<x.length; i++) x[i] = 0;
return Math.sqrt(eval(x)[0]); return eval(x)[0];
} }
/********************************************************************************************************************** /**********************************************************************************************************************
* These are for GUI * These are for GUI