pub struct ThinningStats {
pub input_count: usize,
pub kept_count: usize,
pub reduction_ratio: f64,
}Expand description
Summary statistics for a single thinning invocation.
Fields§
§input_count: usizeNumber of points in the input cloud.
kept_count: usizeNumber of points in the output cloud after thinning.
reduction_ratio: f64Fraction of input points discarded, in [0, 1]. Defined as
1 - kept_count / input_count; zero when input_count == 0.
Implementations§
Source§impl ThinningStats
impl ThinningStats
Sourcepub fn new(input_count: usize, kept_count: usize) -> Self
pub fn new(input_count: usize, kept_count: usize) -> Self
Construct a ThinningStats from the input/output cardinalities,
computing the reduction ratio.
reduction_ratio is 0.0 when input_count == 0 to avoid a
division-by-zero, and is otherwise clamped to [0, 1] by construction
(because kept_count <= input_count for every operator in this
module).
Trait Implementations§
Source§impl Clone for ThinningStats
impl Clone for ThinningStats
Source§fn clone(&self) -> ThinningStats
fn clone(&self) -> ThinningStats
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 moreimpl Copy for ThinningStats
Source§impl Debug for ThinningStats
impl Debug for ThinningStats
Source§impl Default for ThinningStats
impl Default for ThinningStats
Source§fn default() -> ThinningStats
fn default() -> ThinningStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ThinningStats
impl RefUnwindSafe for ThinningStats
impl Send for ThinningStats
impl Sync for ThinningStats
impl Unpin for ThinningStats
impl UnsafeUnpin for ThinningStats
impl UnwindSafe for ThinningStats
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