Struct timely::progress::frontier::Antichain
[−]
[src]
pub struct Antichain<T> { /* fields omitted */ }
A set of mutually incomparable elements.
An antichain is a set of partially ordered elements, each of which is incomparable to the others. This antichain implementation allows you to repeatedly introduce elements to the antichain, and which will evict larger elements to maintain the minimal antichain, those incomparable elements no greater than any other element.
Methods
impl<T: PartialOrder> Antichain<T>
[src]
pub fn insert(&mut self, element: T) -> bool
[src]
Updates the Antichain
if the element is not greater than or equal to some present element.
Returns true if element is added to the set
pub fn new() -> Antichain<T>
[src]
Creates a new empty Antichain
.
pub fn from_elem(element: T) -> Antichain<T>
[src]
Creates a new singleton Antichain
.
pub fn clear(&mut self)
[src]
Clears the contents of the antichain.
pub fn sort(&mut self) where
T: Ord,
[src]
T: Ord,
Sorts the elements so that comparisons between antichains can be made.
pub fn less_than(&self, time: &T) -> bool
[src]
Returns true if any item in the antichain is strictly less than the argument.
pub fn less_equal(&self, time: &T) -> bool
[src]
Returns true if any item in the antichain is less than or equal to the argument.
pub fn dominates(&self, other: &Antichain<T>) -> bool
[src]
Returns true if every element of other
is greater or equal to some element of self
.
pub fn elements(&self) -> &[T]
[src]
Reveals the elements in the antichain.
Trait Implementations
impl<T: Default> Default for Antichain<T>
[src]
impl<T: Clone> Clone for Antichain<T>
[src]
fn clone(&self) -> Antichain<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Eq> Eq for Antichain<T>
[src]
impl<T: PartialEq> PartialEq for Antichain<T>
[src]
fn eq(&self, __arg_0: &Antichain<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Antichain<T>) -> bool
[src]
This method tests for !=
.