Skip to main content

PcurveFitReport

Struct PcurveFitReport 

Source
pub struct PcurveFitReport {
    pub residual: f64,
    pub floor: f64,
    pub samples: usize,
    pub exit: PcurveFitExit,
    pub off_surface: f64,
    pub raised: bool,
}
Expand description

What a pcurve fit ACHIEVED, returned beside the curve so a ceiling exit can never be mistaken for a met floor.

fit_pcurve_on_surface asks for PCURVE_REFINEMENT_TOLERANCE and stops at [MAX_PCURVE_SAMPLES] — or, where that ceiling bound and the floor is reachable, at [PCURVE_RAISED_SAMPLES]. Until 2026-09-12 a trim that ran out of samples came back exactly like one that met the floor; on boolean_fuzz_corpus/25_cube_pierce_solid that silence hid a 1.65e-3 volume error. Now every fit says which it was: residual is measured on the curve that is actually returned and exit names why refinement stopped.

This is a MEASUREMENT taken at a construction, not a band.

Fields§

§residual: f64

Largest 3D distance between the returned pcurve’s image on the surface and the edge curve. On a PcurveFitExit::Converged exit whose final round probed every span this is that round’s maximum — the refinement’s own acceptance test. On every other exit, including a converged round that skipped spans narrower than 1e-3 of the parameter range, it is a sweep over EVERY span of the returned curve.

§floor: f64

The residual the refinement was asked to reach.

§samples: usize

Interpolation samples in the returned curve.

§exit: PcurveFitExit

Why refinement stopped.

§off_surface: f64

Largest distance from the edge curve to the surface at every station the fit inverted — the part of residual no pcurve can remove, since a pcurve’s image lies ON the surface. Zero for an affine carrier. A value above floor says the floor is unreachable for this input; a ceiling exit is retried only while residual exceeds it by more than the floor, i.e. while the returned curve is worse than its input.

§raised: bool

Whether the fit re-entered refinement with [PCURVE_RAISED_SAMPLES] after [MAX_PCURVE_SAMPLES] bound with the floor unmet.

Implementations§

Source§

impl PcurveFitReport

Source

pub fn met_floor(&self) -> bool

Whether the returned curve reaches the floor it was asked for.

Source

pub fn on_bar(&self) -> bool

Whether the returned curve is on the ACCEPTANCE BAR: the floor it was asked for, plus the stations’ own standoff from the carrier.

A pcurve’s image lies on the carrier, so at a station standing g off it no image can come closer than g; a fit whose residual is within the floor of off_surface is as good as the input allows, and one over it is worse than its input — the same condition [refine_pcurve] uses to decide that a raise can still buy accuracy. This is the bar every station builder refuses over (build_pcurve_on_surface_stations). It is blind to sideways error quadratically (a station tracked d aside of the projection of a point g off the surface reads only d²/(2g) further away), which is stated rather than hidden: on the import corpus the stations that stand off their carriers are the FILE’s curves, and the bar there is the file’s own number.

Trait Implementations§

Source§

impl Clone for PcurveFitReport

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 Copy for PcurveFitReport

Source§

impl Debug for PcurveFitReport

Source§

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

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

impl PartialEq for PcurveFitReport

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 StructuralPartialEq for PcurveFitReport

Auto Trait Implementations§

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> 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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more