adapted to the mathematics changes

This commit is contained in:
Michael de Paly 2010-02-11 01:15:53 +00:00
parent 7b42db0f51
commit 4771d08c04

View File

@ -98,7 +98,7 @@ public class MutateESCorrVector implements InterfaceMutation, java.io.Serializab
private double[] calcInitialVel(double velocity, double[][] doubleRange) { private double[] calcInitialVel(double velocity, double[][] doubleRange) {
double[] initVelocity = Mathematics.randomVector(doubleRange.length, 1.0); double[] initVelocity = Mathematics.randomVector(doubleRange.length, 1.0);
double nrm=Mathematics.norm(initVelocity); double nrm=Mathematics.norm(initVelocity);
double[] shiftedRange=Mathematics.shiftRange(doubleRange); double[] shiftedRange=Mathematics.getAbsRange(doubleRange);
// normalize to speed // normalize to speed
Mathematics.svMult(velocity/nrm, initVelocity, initVelocity); Mathematics.svMult(velocity/nrm, initVelocity, initVelocity);
// and scale by ranges // and scale by ranges