Struct vortex_array::stats::StatsSet

source ·
pub struct StatsSet { /* private fields */ }

Implementations§

source§

impl StatsSet

source

pub fn new_unchecked(values: Vec<(Stat, Scalar)>) -> 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.

source

pub fn nulls(len: usize, dtype: &DType) -> Self

Specialized constructor for the case where the StatsSet represents an array consisting entirely of null values.

source

pub fn constant(scalar: &Scalar, length: usize) -> Self

source

pub fn bools_with_true_and_null_count( true_count: usize, null_count: usize, len: usize, ) -> Self

source

pub fn of<S: Into<Scalar>>(stat: Stat, value: S) -> Self

source§

impl StatsSet

source

pub fn len(&self) -> usize

Count of stored stats with known values.

source

pub fn is_empty(&self) -> bool

Predicate equivalent to a len of zero.

source

pub fn get(&self, stat: Stat) -> Option<&Scalar>

source

pub fn get_as<T: for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, stat: Stat, ) -> Option<T>

source

pub fn set<S: Into<Scalar>>(&mut self, stat: Stat, value: S)

Set the stat stat to value.

source

pub fn clear(&mut self, stat: Stat)

Clear the stat stat from the set.

source

pub fn retain_only(&mut self, stats: &[Stat])

source

pub fn iter(&self) -> impl Iterator<Item = &(Stat, Scalar)>

Iterate over the statistic names and values in-place.

See Iterator.

source§

impl StatsSet

source

pub fn merge_ordered(self, other: &Self) -> Self

Merge stats set other into self, with the semantic assumption that other contains stats from an array that is appended to the array represented by self.

source

pub fn merge_unordered(self, other: &Self) -> Self

Merge stats set other into self, with no assumption on ordering. Stats that are not commutative (e.g., is_sorted) are dropped from the result.

Trait Implementations§

source§

impl Clone for StatsSet

source§

fn clone(&self) -> StatsSet

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StatsSet

source§

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

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

impl Default for StatsSet

source§

fn default() -> StatsSet

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

impl Extend<(Stat, Scalar)> for StatsSet

source§

fn extend<T: IntoIterator<Item = (Stat, Scalar)>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
source§

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)

🔬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 IntoIterator for StatsSet

source§

type Item = (Stat, Scalar)

The type of the elements being iterated over.
source§

type IntoIter = StatsSetIntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq for StatsSet

source§

fn eq(&self, other: &StatsSet) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for StatsSet

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
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 = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> Ungil for T
where T: Send,