/src/main/java/net/finmath/optimizer/StochasticLevenbergMarquardt.java
clonedOptimizer.targetValues = newTargetVaues.clone( ) ;clonedOptimizer.targetValues = newTargetVaues.toArray( new RandomVariable[] {}) ;
clonedOptimizer.targetValues = newTargetVaues.toArray ( new RandomVariable[] {} ) ;
clonedOptimizer.initialParameters = this.getBestFitParameters(); } return clonedOptimizer; } public StochasticLevenbergMarquardt getCloneWithModifiedTargetValues(final List<RandomVariable> newTargetVaues, final List<RandomVariable> newWeights, final boolean isUseBestParametersAsInitialParameters) throws CloneNotSupportedException { final StochasticLevenbergMarquardt clonedOptimizer = clone(); <extra_id_0> if(isUseBestParametersAsInitialParameters && this.done()) { clonedOptimizer.initialParameters = this.getBestFitParameters(); } return clonedOptimizer; } }