Skip to main content

PolylineFitLedger

Struct PolylineFitLedger 

Source
pub struct PolylineFitLedger {
    pub fits: u64,
    pub unmet: u64,
    pub station_ceiling: u64,
    pub input_exhausted: u64,
    pub stalled: u64,
    pub unrefined: u64,
    pub refined: u64,
    pub met_at_pool: u64,
    pub lane_switched: u64,
    pub extra_rungs: u64,
    pub worst_unmet_deviation: f64,
    pub worst_dropped_band: f64,
}
Expand description

Per-operation tally of polyline fits and how many missed their tolerance.

The same shape, and for the same reason, as crate::PcurveFitLedger: fit_polyline is called from the imprint driver and from the offset reintersection, neither of which has a diagnostics record to write into. An operation that returns KernelDiagnostics opens a PolylineFitScope; every fit made on that thread while the scope is open is tallied here, and closing it hands the tally back for PolylineFitLedger::report_into. Scopes nest — closing a child folds it into its parent — and a scope DROPPED without being closed is discarded, so a refused boolean attempt does not leave its fits on the caller’s tally. With no scope open, recording is a no-op.

Fields§

§fits: u64

Fits recorded, met ones included.

§unmet: u64

Fits whose returned curve did not reach its tolerance.

§station_ceiling: u64

Unmet fits that stopped at MAX_FIT_STATIONS.

§input_exhausted: u64

Unmet fits that had already used every station the input offers.

§stalled: u64

Unmet fits whose last doubling bought nothing.

§unrefined: u64

Unmet fits that never refined (a single-rung fit, or the escape hatch).

§refined: u64

Fits that spent more than one rung, met or not.

§met_at_pool: u64

Fits that met their tolerance only with every station the input offers — a SATURATED reading (see PolylineFitReport::saturated).

§lane_switched: u64

Fits returned from the lane the caller did NOT ask for, because the caller’s own ladder ended unmet and the other lane measured better.

§extra_rungs: u64

Extra rungs spent over every fit — what the ladder cost.

§worst_unmet_deviation: f64

Largest deviation among the unmet fits; zero when there are none.

§worst_dropped_band: f64

Largest PolylineFitReport::dropped_band over every fit.

Implementations§

Source§

impl PolylineFitLedger

Source

pub fn report_into(&self, diagnostics: &mut KernelDiagnostics)

Write the tally into an operation’s diagnostics: the fit.polyline.* counters always, plus one fit.polyline.unmet_tolerance event at DiagnosticSeverity::Degraded when any fit missed its tolerance. Degraded, not Error: the curve is still the kernel’s best interpolant of the points it was given and the solid stays shippable, but it no longer claims the accuracy the caller asked for.

Trait Implementations§

Source§

impl Clone for PolylineFitLedger

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 PolylineFitLedger

Source§

impl Debug for PolylineFitLedger

Source§

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

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

impl Default for PolylineFitLedger

Source§

fn default() -> Self

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

impl PartialEq for PolylineFitLedger

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 PolylineFitLedger

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