pub struct FitOptions<'a, S> {
pub normals: Option<&'a [Vector]>,
pub cutoff: Cutoff,
pub robust_start: bool,
pub fixed: FitFixed,
pub guess: Option<S>,
pub side: Option<Side>,
pub radius_range: Option<(f64, f64)>,
}Expand description
How to fit.
S is the shape fitted, the type of the starting guess.
Fields§
§normals: Option<&'a [Vector]>A normal for each point, used for the start and to tell which side the material is on; never in the least squares itself, which measures the points alone. Their sense is the material’s outside.
cutoff: CutoffWhich points are kept between rounds.
robust_start: boolStart from a consensus over small subsets of the points, scored by their median residual, rather than from all of them: a start that many outliers cannot pull away, and whose residuals choose the first round’s points.
fixed: FitFixedWhat is held instead of fitted.
guess: Option<S>Start from this shape rather than from the estimate; a robust start then only chooses the first round’s points, by their residuals from it. A closed-form fit (a plane, a line) has no start, and ignores it.
side: Option<Side>Which side the material is on. Where it is not given and normals are, the normals decide.
radius_range: Option<(f64, f64)>The radius a fit must land within, inclusive: the radius
FitFixed::radius would hold.
Trait Implementations§
Source§impl<'a, S: Clone> Clone for FitOptions<'a, S>
impl<'a, S: Clone> Clone for FitOptions<'a, S>
Source§impl<'a, S: Debug> Debug for FitOptions<'a, S>
impl<'a, S: Debug> Debug for FitOptions<'a, S>
Source§impl<S> Default for FitOptions<'_, S>
impl<S> Default for FitOptions<'_, S>
Source§impl<'a, S: PartialEq> PartialEq for FitOptions<'a, S>
impl<'a, S: PartialEq> PartialEq for FitOptions<'a, S>
impl<'a, S: PartialEq> StructuralPartialEq for FitOptions<'a, S>
Auto Trait Implementations§
impl<'a, S> Freeze for FitOptions<'a, S>where
S: Freeze,
impl<'a, S> RefUnwindSafe for FitOptions<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for FitOptions<'a, S>where
S: Send,
impl<'a, S> Sync for FitOptions<'a, S>where
S: Sync,
impl<'a, S> Unpin for FitOptions<'a, S>where
S: Unpin,
impl<'a, S> UnsafeUnpin for FitOptions<'a, S>where
S: UnsafeUnpin,
impl<'a, S> UnwindSafe for FitOptions<'a, S>where
S: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.