Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
powei-lin committed Mar 11, 2024
1 parent b4f1da0 commit f6429ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/gauss_newton_optimizer.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use std::ops::Mul;
use std::time::{Duration, Instant};
use std::time::Instant;

use faer::solvers::{SpSolver, SpSolverLstsq};
use faer_ext::IntoNalgebra;
use nalgebra as na;

use crate::{linear::sparse_cholesky, optimizer};
pub struct GaussNewtonOptimizer {}
Expand Down Expand Up @@ -31,6 +28,6 @@ impl optimizer::Optimizer for GaussNewtonOptimizer {
let dx_na = dx.as_ref().into_nalgebra().column(0).clone_owned();
self.apply_dx(&dx_na, &mut params, &problem.variable_name_to_col_idx_dict);
}
return params;
params
}
}
3 changes: 2 additions & 1 deletion src/linear.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use faer::prelude::SpSolver;
use std::ops::Mul;

use faer::prelude::SpSolver;

pub fn sparse_cholesky(
residuals: &faer::Mat<f64>,
jacobians: &faer::sparse::SparseColMat<usize, f64>,
Expand Down

0 comments on commit f6429ce

Please sign in to comment.