pub struct BufferStatistics {
pub min: f64,
pub max: f64,
pub mean: f64,
pub std_dev: f64,
pub valid_count: u64,
pub histogram: Option<Vec<u64>>,
}Expand description
Statistics computed from a buffer
Note: Copy is intentionally not derived because the optional histogram
contains a Vec, making bitwise copy semantics inappropriate.
Fields§
§min: f64Minimum value
max: f64Maximum value
mean: f64Mean value
std_dev: f64Standard deviation
valid_count: u64Number of valid (non-nodata) pixels
histogram: Option<Vec<u64>>Optional histogram bin counts (uniform spacing from min to max)
None when computed via RasterBuffer::compute_statistics.
Some(bins) when computed via RasterBuffer::compute_statistics_with_histogram.
Trait Implementations§
Source§impl Clone for BufferStatistics
impl Clone for BufferStatistics
Source§fn clone(&self) -> BufferStatistics
fn clone(&self) -> BufferStatistics
Returns a duplicate of the value. Read more
1.0.0 · 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 BufferStatistics
impl Debug for BufferStatistics
Source§impl From<BufferStatistics> for Statistics
Implements a lossy conversion from BufferStatistics into Statistics.
impl From<BufferStatistics> for Statistics
Implements a lossy conversion from BufferStatistics into Statistics.
Sets total_count = valid_count (a conservative approximation when the
exact raster dimensions are not available). The histogram, if present in
buf_stats, is preserved.
Source§fn from(buf_stats: BufferStatistics) -> Self
fn from(buf_stats: BufferStatistics) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BufferStatistics
impl PartialEq for BufferStatistics
impl StructuralPartialEq for BufferStatistics
Auto Trait Implementations§
impl Freeze for BufferStatistics
impl RefUnwindSafe for BufferStatistics
impl Send for BufferStatistics
impl Sync for BufferStatistics
impl Unpin for BufferStatistics
impl UnsafeUnpin for BufferStatistics
impl UnwindSafe for BufferStatistics
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