def update(self,iiter,H,Y,eta,loss):
if iiter <= self.niter_trace+<NUM_LIT:1>:<EOL><INDENT>self.H[iiter] = H<EOL>self.Y[iiter] = Y<EOL><DEDENT>elif iiter >self.niter - self.niter_trace + <NUM_LIT:1>:<EOL><INDENT>self.H[self.ltrace+iiter-self.niter-<NUM_LIT:1>] = H<EOL>self.Y[self.ltrace+iiter-self.niter-<NUM_LIT:1>] = Y<EOL><DEDENT>self.etas[iiter] = eta<EOL>self.loss[iiter] = loss<EOL>if self.loss[iiter] < self.lmin:<EOL><INDENT>self.Yh = Y<EOL>self.lmin = self.loss[iiter]<EOL>self.miniter = iiter if not iiter == -<NUM_LIT:1> else self.niter + <NUM_LIT:1><EOL><DEDENT>
Update the trace_var in new iteration