private void updateAverage ( ) { if ( t == last_t || t < burnIn ) return ; else if ( last_t < burnIn ) //first update since done burning { for ( int i = 0 ; i < alphaAveraged . size ( ) ; i ++ ) alphaAveraged . set ( i , alphas . get ( i ) ) ; } double w = t - last_t ; //time elapsed for ( int i = 0 ; i < alphaAveraged . size ( ) ; i ++ ) { double delta = alphas . getD ( i ) - alphaAveraged . getD ( i ) ; alphaAveraged . set ( i , alphaAveraged . getD ( i ) + delta * w / t ) ; } last_t = t ; //average done }
Updates the average model to reflect the current time average