- some clippy fixes

This commit is contained in:
w.pomp committed 2026-07-31 15:32:41 +02:00
1 parent db2b72c3bf
commit f75f12db16
3 files changed
+19 -23

No files matched your search

+4 -8
View File
@@ -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()))
}