pub struct CompactnessOutcome {
pub passes: bool,
pub ratio_ppm: u128,
pub min_ppm: u128,
}Expand description
Outcome of the isoperimetric compactness check.
ratio_ppm is the computed compactness score in parts-per-million, directly
comparable to min_ppm (the configured threshold). It equals
8_000_000 * twice_area / perimeter²; for a 1:1 square this is ~1_000_000.
Saturated to u128::MAX on lhs overflow (a massive-area polygon is
unambiguously compact) and to 0 on perimeter² / rhs overflow.
Fields§
§passes: bool§ratio_ppm: u128§min_ppm: u128Trait Implementations§
Source§impl Clone for CompactnessOutcome
impl Clone for CompactnessOutcome
Source§fn clone(&self) -> CompactnessOutcome
fn clone(&self) -> CompactnessOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompactnessOutcome
impl Debug for CompactnessOutcome
Source§impl PartialEq for CompactnessOutcome
impl PartialEq for CompactnessOutcome
Source§fn eq(&self, other: &CompactnessOutcome) -> bool
fn eq(&self, other: &CompactnessOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CompactnessOutcome
impl Eq for CompactnessOutcome
impl StructuralPartialEq for CompactnessOutcome
Auto Trait Implementations§
impl Freeze for CompactnessOutcome
impl RefUnwindSafe for CompactnessOutcome
impl Send for CompactnessOutcome
impl Sync for CompactnessOutcome
impl Unpin for CompactnessOutcome
impl UnsafeUnpin for CompactnessOutcome
impl UnwindSafe for CompactnessOutcome
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
Mutably borrows from an owned value. Read more