Skip to main content

FitOptions

Struct FitOptions 

Source
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: Cutoff

Which points are kept between rounds.

§robust_start: bool

Start 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: FitFixed

What 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>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, S: Debug> Debug for FitOptions<'a, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S> Default for FitOptions<'_, S>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a, S: PartialEq> PartialEq for FitOptions<'a, S>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.