- some clippy fixes
This commit is contained in:
1 parent
db2b72c3bf
commit
f75f12db16
3 files changed
+19
-23
No files matched your search
+4
-8
@@ -10,18 +10,15 @@ use std::marker::PhantomData;
|
||||
|
||||
/// Optimizer type for registration
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Default)]
|
||||
pub enum Optimizer {
|
||||
/// L-BFGS optimizer (fast, requires consistent gradients)
|
||||
#[default]
|
||||
LBFGS,
|
||||
/// Adaptive Stochastic Gradient Descent (robust, handles noisy gradients)
|
||||
ASGD,
|
||||
}
|
||||
|
||||
impl Default for Optimizer {
|
||||
fn default() -> Self {
|
||||
Self::LBFGS
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RegistrationStep {
|
||||
@@ -358,11 +355,10 @@ impl<D: Dimension> Registration<D> {
|
||||
&scales,
|
||||
);
|
||||
|
||||
if let Some(result) = optimization_result {
|
||||
if result.optimal_point.iter().all(|i| i.is_finite()) {
|
||||
if let Some(result) = optimization_result
|
||||
&& result.optimal_point.iter().all(|i| i.is_finite()) {
|
||||
p = self.fixed_mu.combine(&result.optimal_point);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(Transform::<D>::new(p, fixed.shape().to_vec()))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user