// Initialize Levenberg-Marquardt parameter and iteration counter
Initialize Levenberg-Marquardt parameter and iteration counter
Initialize Levenberg - Marquardt parameter and iteration counter
fn init_lm(&mut self) -> Result<()> {
        self.f.eval(self.xall, &mut self.fvec)?;
        self.nfev += 1;
        self.fnorm = self.fvec.enorm();
        self.orig_norm = self.fnorm * self.fnorm;
        self.xnew.copy_from_slice(self.xall);
        self.x = Vec::with_capacity(self.nfree);
        for i in 0..self.nfree {
            self.x.push(self.xall[self.ifree[i]]);
        }
        self.qtf = vec![0.; self.nfree];
        self.fjac = vec![0.; self.m * self.nfree];
        Ok(())
    }
fn init_lm ( & mut self ) -> Result < ( ) > { self . f . eval ( self . xall , & mut self . fvec ) ? ; self . nfev += 1 ; self . fnorm = self . fvec . enorm ( ) ; self . orig_norm = self . fnorm * self . fnorm ; self . xnew . copy_from_slice ( self . xall ) ; self . x = Vec :: with_capacity ( self . nfree ) ; for i in 0 .. self . nfree { self . x . push ( self . xall [ self . ifree [ i ] ] ) ; } self . qtf = vec ! [ 0. self nfree ] ; self . fjac = vec ! [ 0. self m self nfree ] ; Ok ( ( ) ) }
Initialize Levenberg-Marquardt parameter and iteration counter
Initialize Levenberg - Marquardt parameter and iteration counter
&mut self