Type Definition utote::simd::MSu32x4[][src]

type MSu32x4<U> = Multiset<u32x4, U>;

Implementations

impl<U, B> MSu32x4<UInt<U, B>> where
    UInt<U, B>: ArrayLength<u32x4>, 
[src]

pub fn empty() -> Self[src]

Returns a Multiset of the given array * SIMD vector size with all elements set to zero.

pub fn repeat(elem: u32) -> Self[src]

Returns a Multiset of the given array * SIMD vector size with all elements set to elem.

pub fn from_slice(slice: &[u32]) -> Self[src]

Returns a Multiset from a slice of the given array * SIMD vector size.

pub const fn len() -> usize[src]

The number of elements in the multiset.

pub fn clear(&mut self)[src]

Sets all element counts in the multiset to zero.

pub fn contains(self, elem: usize) -> bool[src]

Checks that a given element has at least one member in the multiset.

pub unsafe fn contains_unchecked(self, elem: usize) -> bool[src]

Checks that a given element has at least one member in the multiset without bounds checks.

Safety

Does not do bounds check on whether this element is an index in the underlying array.

pub fn intersection(&self, other: &Self) -> Self[src]

Returns a multiset which is the intersection of self and other.

The Intersection of two multisets A & B is defined as the multiset C where C[0] == min(A[0], B[0]).

pub fn union(&self, other: &Self) -> Self[src]

Returns a multiset which is the union of self and other.

The union of two multisets A & B is defined as the multiset C where C[0] == max(A[0], B[0]).

pub fn count_zero(&self) -> u32[src]

Return the number of elements whose member count is zero.

pub fn count_non_zero(&self) -> u32[src]

Return the number of elements whose member count is non-zero.

pub fn is_empty(&self) -> bool[src]

Check whether all elements have zero members.

pub fn is_singleton(&self) -> bool[src]

Check whether only one element has one or more members.

pub fn is_subset(&self, other: &Self) -> bool[src]

Check whether self is a subset of other.

Multisets A is a subset of B if A[i] <= B[i] for all i in A.

pub fn is_superset(&self, other: &Self) -> bool[src]

Check whether self is a superset of other.

Multisets A is a superset of B if A[i] >= B[i] for all i in A.

pub fn is_proper_subset(&self, other: &Self) -> bool[src]

Check whether self is a proper subset of other.

Multisets A is a proper subset of B if A[i] <= B[i] for all i in A and there exists j such that A[j] < B[j].

pub fn is_proper_superset(&self, other: &Self) -> bool[src]

Check whether self is a proper superset of other.

Multisets A is a proper superset of B if A[i] >= B[i] for all i in A and there exists j such that A[j] > B[j].

pub fn is_any_lesser(&self, other: &Self) -> bool[src]

Check whether any element of self is less than an element of other.

True if the exists some i such that A[i] < B[i].

pub fn is_any_greater(&self, other: &Self) -> bool[src]

Check whether any element of self is greater than an element of other.

True if the exists some i such that A[i] > B[i].

pub fn total(&self) -> u32[src]

The total or cardinality of a multiset is the sum of all its elements member counts.

Notes:

  • This may overflow.
  • The implementation uses a horizontal operation on SIMD vectors.

pub fn argmax(&self) -> (usize, u32)[src]

Returns a tuple containing the (element, corresponding largest member count) in the multiset.

Notes:

  • The implementation extracts values from the underlying SIMD vectors.

pub fn imax(&self) -> usize[src]

Returns the element corresponding to the largest member count in the multiset.

Notes:

  • The implementation extracts values from the underlying SIMD vectors.

pub fn max(&self) -> u32[src]

Returns the largest member count in the multiset.

Notes:

  • The implementation uses a horizontal operation on the underlying SIMD vectors.

pub fn argmin(&self) -> (usize, u32)[src]

Returns a tuple containing the (element, corresponding smallest member count) in the multiset.

Notes:

  • The implementation extracts values from the underlying SIMD vectors.

pub fn imin(&self) -> usize[src]

Returns the element corresponding to the smallest member count in the multiset.

Notes:

  • The implementation extracts values from the underlying SIMD vectors.

pub fn min(&self) -> u32[src]

Returns the smallest member count in the multiset.

Notes:

  • The implementation uses a horizontal operation on the underlying SIMD vectors.

pub fn choose(&mut self, elem: usize)[src]

Set all elements member counts, except for the given elem, to zero.

pub fn choose_random(&mut self, rng: &mut StdRng)[src]

Set all elements member counts, except for a random one, to zero.

Notes:

  • The implementation extracts values from the underlying SIMD vectors.

pub fn collision_entropy(&self) -> f64[src]

Calculate the collision entropy of the multiset.

Notes:

  • The implementation uses a horizontal operation on SIMD vectors.

pub fn shannon_entropy(&self) -> f64[src]

Calculate the shannon entropy of the multiset. Uses ln rather than log2.

Notes:

  • The implementation uses a horizontal operation on SIMD vectors.

Trait Implementations

impl<U, B> FromIterator<u32> for MSu32x4<UInt<U, B>> where
    UInt<U, B>: ArrayLength<u32x4>, 
[src]

impl<U, B> IntoIterator for MSu32x4<UInt<U, B>> where
    UInt<U, B>: ArrayLength<u32x4>, 
[src]

type Item = u32

The type of the elements being iterated over.

type IntoIter = MultisetIterator<u32x4, UInt<U, B>>

Which kind of iterator are we turning this into?

impl<U, B> PartialOrd<Multiset<Simd<[u32; 4]>, UInt<U, B>>> for MSu32x4<UInt<U, B>> where
    UInt<U, B>: ArrayLength<u32x4>, 
[src]