Skip to main content

RecognitionWork

Struct RecognitionWork 

Source
#[non_exhaustive]
pub struct RecognitionWork { pub attempts: usize, pub rounds: usize, pub exhausted: bool, pub seeded_components: usize, pub hypotheses_by_kind: [usize; 5], pub stops_at_risk_bound: usize, pub stops_at_hypothesis_cap: usize, pub stops_at_seed_exhaustion: usize, pub stops_at_budget: usize, }
Expand description

Work spent by recognize_surfaces_with_attempt_budget.

Non-exhaustive: a later counter is not a breaking change.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§attempts: usize

Generic hypotheses drawn, over every extraction round of every connected component.

§rounds: usize

Regions accepted by generic extraction.

§exhausted: bool

Whether the budget ran out before extraction finished. The regions are then those accepted before the budget ran out (the round in progress is dropped), so they are a prefix of the unbudgeted run’s.

§seeded_components: usize

Connected components accepted whole on a supplied ComponentCandidate after their own whole fit was refused.

§hypotheses_by_kind: [usize; 5]

Generic hypotheses drawn per primitive kind, in the recognizer’s kind order (plane, sphere, cylinder, cone, torus).

§stops_at_risk_bound: usize

Extraction rounds that stopped because every kind’s miss bound fell to 1 - confidence (the classical seed bound, or the adaptive policy’s product bound).

§stops_at_hypothesis_cap: usize

Extraction rounds that stopped at max_hypotheses (or at one draw per remaining triangle per kind, when that is smaller) with the bound not yet met.

§stops_at_seed_exhaustion: usize

Extraction rounds of the adaptive policy that stopped because every remaining triangle had seeded every kind.

§stops_at_budget: usize

Extraction rounds cut short by the attempt budget; the round’s candidates are dropped and exhausted is set.

Trait Implementations§

Source§

impl Clone for RecognitionWork

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 RecognitionWork

Source§

impl Debug for RecognitionWork

Source§

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

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

impl Default for RecognitionWork

Source§

fn default() -> Self

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

impl Eq for RecognitionWork

Source§

impl PartialEq for RecognitionWork

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 RecognitionWork

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.