pub struct LocalStepParams<F: Float = f32> {
pub k_neighbors: usize,
pub max_step_factor: F,
pub sector_half_width_rad: F,
pub bandwidth_rel: F,
pub mean_shift_max_iters: u32,
pub mean_shift_convergence_rel: F,
pub confidence_denominator: F,
}Expand description
Tuning knobs for estimate_local_steps.
Fields§
§k_neighbors: usizeNearest-neighbor count fed to the KD-tree per point. Defaults to 8 — enough for a 4-connected grid even when a handful of neighbors are missing.
max_step_factor: FClamp neighbors whose |offset| exceeds this factor times the local
median distance. Defaults to 3.0.
sector_half_width_rad: FHalf-width (radians) of the u and v sectors. Defaults to π/6 (30°)
so that grid diagonals — which sit exactly at 45° on an orthogonal
chessboard — are excluded from both sectors rather than polluting one
of them. Widen this if the detector emits heavily-warped grids whose
on-axis neighbors rotate more than 30° away from the lattice axes.
bandwidth_rel: FBandwidth for the 1-D mean-shift mode finder, expressed as a fraction
of each sector’s median |offset|. Defaults to 0.15.
mean_shift_max_iters: u32Maximum mean-shift iterations before falling back to the sector
median. Defaults to 20.
mean_shift_convergence_rel: FMean-shift converges when the update magnitude drops below
bandwidth × convergence_rel. Defaults to 1e-3.
confidence_denominator: FDenominator used when converting supporter count to confidence. A
well-connected interior corner has up to 4 supporters in each axis
(2 left/right, 2 up/down), so the default of 4.0 keeps well-supported
corners at confidence ≥ 1.0.
Trait Implementations§
Source§impl<F: Clone + Float> Clone for LocalStepParams<F>
impl<F: Clone + Float> Clone for LocalStepParams<F>
Source§fn clone(&self) -> LocalStepParams<F>
fn clone(&self) -> LocalStepParams<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<F: Float> Default for LocalStepParams<F>
impl<F: Float> Default for LocalStepParams<F>
impl<F: Copy + Float> Copy for LocalStepParams<F>
Auto Trait Implementations§
impl<F> Freeze for LocalStepParams<F>where
F: Freeze,
impl<F> RefUnwindSafe for LocalStepParams<F>where
F: RefUnwindSafe,
impl<F> Send for LocalStepParams<F>
impl<F> Sync for LocalStepParams<F>
impl<F> Unpin for LocalStepParams<F>where
F: Unpin,
impl<F> UnsafeUnpin for LocalStepParams<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for LocalStepParams<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.