pub struct StatsSet { /* private fields */ }
Implementations§
Source§impl StatsSet
impl StatsSet
Sourcepub fn new_unchecked(values: Vec<(Stat, Precision<ScalarValue>)>) -> Self
pub fn new_unchecked(values: Vec<(Stat, Precision<ScalarValue>)>) -> Self
Create new StatSet without validating uniqueness of all the entries
§Safety
This method will not panic or trigger UB, but may lead to duplicate stats being stored.
Sourcepub fn nulls(len: usize) -> Self
pub fn nulls(len: usize) -> Self
Specialized constructor for the case where the StatsSet represents an array consisting entirely of null values.
pub fn empty_array() -> StatsSet
pub fn constant(scalar: Scalar, length: usize) -> Self
pub fn bools_with_sum_and_null_count( true_count: usize, null_count: usize, len: usize, ) -> Self
pub fn of(stat: Stat, value: Precision<ScalarValue>) -> Self
Source§impl StatsSet
impl StatsSet
Sourcepub fn set(&mut self, stat: Stat, value: Precision<ScalarValue>)
pub fn set(&mut self, stat: Stat, value: Precision<ScalarValue>)
Set the stat stat
to value
.
pub fn retain_only(&mut self, stats: &[Stat])
pub fn keep_inexact_stats(self, inexact_keep: &[Stat]) -> Self
Source§impl StatsSet
impl StatsSet
Sourcepub fn merge_ordered(self, other: &Self, dtype: &DType) -> Self
pub fn merge_ordered(self, other: &Self, dtype: &DType) -> Self
Merge stats set other
into self
, with the semantic assumption that other
contains stats from a disjoint array that is appended to the array represented by self
.
Sourcepub fn merge_unordered(self, other: &Self, dtype: &DType) -> Self
pub fn merge_unordered(self, other: &Self, dtype: &DType) -> Self
Merge stats set other
into self
, from a disjoint array, with no ordering assumptions.
Stats that are not commutative (e.g., is_sorted) are dropped from the result.
pub fn combine_sets(&mut self, other: &Self, dtype: &DType) -> VortexResult<()>
Trait Implementations§
Source§impl Extend<(Stat, Precision<ScalarValue>)> for StatsSet
impl Extend<(Stat, Precision<ScalarValue>)> for StatsSet
Source§fn extend<T: IntoIterator<Item = (Stat, Precision<ScalarValue>)>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = (Stat, Precision<ScalarValue>)>>( &mut self, iter: T, )
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<ArrayStats> for StatsSet
impl From<ArrayStats> for StatsSet
Source§fn from(value: ArrayStats) -> Self
fn from(value: ArrayStats) -> Self
Converts to this type from the input type.
Source§impl From<StatsSet> for ArrayStats
impl From<StatsSet> for ArrayStats
Source§impl FromIterator<(Stat, Precision<ScalarValue>)> for StatsSet
impl FromIterator<(Stat, Precision<ScalarValue>)> for StatsSet
Source§fn from_iter<T: IntoIterator<Item = (Stat, Precision<ScalarValue>)>>(
iter: T,
) -> Self
fn from_iter<T: IntoIterator<Item = (Stat, Precision<ScalarValue>)>>( iter: T, ) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for StatsSet
impl IntoIterator for StatsSet
Source§impl ReadFlatBuffer for StatsSet
impl ReadFlatBuffer for StatsSet
Source§impl StatsProvider for StatsSet
impl StatsProvider for StatsSet
Source§impl WriteFlatBuffer for StatsSet
impl WriteFlatBuffer for StatsSet
Source§fn write_flatbuffer<'fb>(
&self,
fbb: &mut FlatBufferBuilder<'fb>,
) -> WIPOffset<Self::Target<'fb>>
fn write_flatbuffer<'fb>( &self, fbb: &mut FlatBufferBuilder<'fb>, ) -> WIPOffset<Self::Target<'fb>>
All statistics written must be exact
type Target<'t> = ArrayStats<'t>
Auto Trait Implementations§
impl Freeze for StatsSet
impl RefUnwindSafe for StatsSet
impl Send for StatsSet
impl Sync for StatsSet
impl Unpin for StatsSet
impl UnwindSafe for StatsSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more