System.out.println("LMA: iter="+iter+", full RMS="+last_rms[0]+" ("+initial_rms[0]+"), pure RMS="+last_rms[1]+" ("+initial_rms[1]+") + lambda="+lambda);
}
}
}
if((debug_level>-2)&&!rslt[0]){// failed
if((debug_level>1)||(iter==1)||last_run){
System.out.println("LMA failed on iteration = "+iter);
}
System.out.println();
}
returnrslt[0]?iter:-1;
}
privateboolean[]lmaStep(
doublelambda,
doublerms_diff,
intdebug_level){
boolean[]rslt={false,false};
// maybe the following if() branch is not needed - already done in prepareLMA !
if(this.last_rms==null){//first time, need to calculate all (vector is valid)
last_rms=newdouble[2];
if(debug_level>1){
System.out.println("lmaStep(): first step");
}
double[]fx=getFxDerivs(
parameters_vector,// double [] vector,
last_jt,// final double [][] jt, // should be null or initialized with [vector.length][]
debug_level);// final int debug_level)
last_ymfx=getYminusFxWeighted(
fx,// final double [] fx,
last_rms);// final double [] rms_fp // null or [2]