Skip to content

Commit

Permalink
Merge pull request #17 from doggydoggy0101/main
Browse files Browse the repository at this point in the history
  • Loading branch information
StephLin authored Sep 24, 2024
2 parents 1e36d37 + d552145 commit 9a6ff53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fracgm/src/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ pub trait GemanMcclureSolver<R: R2>: FractionalProgrammingMaterials<R> {
vec = self.solve_x(&mat_a);
self.update_terms_cache(&mut terms, &vec);

(beta, mu) = self.solve_beta_mu(&terms);

let psi_norm = self.compute_psi_norm(&beta, &mu, &terms);
if psi_norm < self.tol() {
break;
}

(beta, mu) = self.solve_beta_mu(&terms);
}

self.project(&self.vec_to_mat(&vec))
Expand Down Expand Up @@ -528,13 +528,13 @@ pub trait GemanMcclureSolverDiagnostic<R: R2>: FractionalProgrammingMaterials<R>
vec = self.solve_x(&mat_a);
self.update_terms_cache(&mut terms, &vec);

(beta, mu) = self.solve_beta_mu(&terms);

let psi_norm = self.compute_psi_norm(&beta, &mu, &terms);
self.update_diagnostics(&vec, &beta, &mu, &terms, &mut iterations);
if psi_norm < self.tol() {
break;
}

(beta, mu) = self.solve_beta_mu(&terms);
}

Diagnostic {
Expand Down

0 comments on commit 9a6ff53

Please sign in to comment.