# HG changeset patch # User Tuomo Valkonen # Date 1747629108 18000 # Node ID 0b9aecd7bb7686669c3be59911b64bd2f98f8013 # Parent 44d859269132323eb949acbdf8819b7acbcbd346 Dist argument order changed to reflect other changes diff -r 44d859269132 -r 0b9aecd7bb76 src/loc.rs --- a/src/loc.rs Sun May 18 23:15:50 2025 -0500 +++ b/src/loc.rs Sun May 18 23:31:48 2025 -0500 @@ -608,7 +608,7 @@ } } -impl Dist for Loc { +impl Dist for Loc { #[inline] fn dist>(&self, other: I, _: L2) -> F { self.dist2(other) @@ -635,7 +635,7 @@ } } -impl Dist for Loc { +impl Dist for Loc { #[inline] fn dist>(&self, other: I, _: L1) -> F { other.eval_ref_decompose(|r| { @@ -663,7 +663,7 @@ } } -impl Dist for Loc { +impl Dist for Loc { #[inline] fn dist>(&self, other: I, _: Linfinity) -> F { other.eval_ref_decompose(|r| { diff -r 44d859269132 -r 0b9aecd7bb76 src/nalgebra_support.rs --- a/src/nalgebra_support.rs Sun May 18 23:15:50 2025 -0500 +++ b/src/nalgebra_support.rs Sun May 18 23:31:48 2025 -0500 @@ -300,7 +300,7 @@ } } -impl Dist for Vector +impl Dist for Vector where M: Dim, S: Storage + Clone, @@ -326,7 +326,7 @@ } } -impl Dist for Vector +impl Dist for Vector where M: Dim, S: Storage + Clone, @@ -352,7 +352,7 @@ } } -impl Dist for Vector +impl Dist for Vector where M: Dim, S: Storage + Clone, diff -r 44d859269132 -r 0b9aecd7bb76 src/norms.rs --- a/src/norms.rs Sun May 18 23:15:50 2025 -0500 +++ b/src/norms.rs Sun May 18 23:31:48 2025 -0500 @@ -26,10 +26,7 @@ pub trait NormExponent: Copy { /// Return the norm as a mappin fn as_mapping(self) -> NormMapping { - NormMapping { - exponent: self, - _phantoms: PhantomData, - } + NormMapping { exponent: self, _phantoms: PhantomData } } } @@ -111,7 +108,7 @@ } /// Trait for distances with respect to a norm. -pub trait Dist: Norm + Space { +pub trait Dist: Norm + Space { /// Calculate the distance fn dist>(&self, other: I, _p: Exponent) -> F; } @@ -183,7 +180,7 @@ } } -impl + Normed> Dist> for E { +impl + Normed> Dist, F> for E { fn dist>(&self, other: I, huber: HuberL1) -> F { huber.apply(self.dist2_squared(other)) } @@ -195,7 +192,7 @@ // } // } -// impl> Dist for Vec { +// impl> Dist for Vec { // fn dist>(&self, other : I, _l21 : L21) -> F { // self.iter().zip(other.iter()).map(|(e, g)| e.dist(g, L2)).sum() // }