pub type OrderingEquivalentClass = EquivalentClass<LexOrdering>;
Expand description

LexOrdering stores the lexicographical ordering for a schema. OrderingEquivalentClass keeps track of different alternative orderings than can describe the schema. For instance, for the table below |a|b|c|d| |1|4|3|1| |2|3|3|2| |3|1|2|2| |3|2|1|3| both vec![a ASC, b ASC] and vec![c DESC, d ASC] describe the ordering of the table. For this case, we say that vec![a ASC, b ASC], and vec![c DESC, d ASC] are ordering equivalent.

Aliased Type§

struct OrderingEquivalentClass { /* private fields */ }

Implementations§

source§

impl<T: Eq + Hash + Clone> EquivalentClass<T>

source

pub fn new(head: T, others: Vec<T>) -> EquivalentClass<T>

source

pub fn head(&self) -> &T

source

pub fn others(&self) -> &HashSet<T>

source

pub fn contains(&self, col: &T) -> bool

source

pub fn insert(&mut self, col: T) -> bool

source

pub fn remove(&mut self, col: &T) -> bool

source

pub fn iter(&self) -> impl Iterator<Item = &T>

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

Trait Implementations§

source§

impl<T: Clone> Clone for EquivalentClass<T>

source§

fn clone(&self) -> EquivalentClass<T>

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<T: Debug> Debug for EquivalentClass<T>

source§

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

Formats the value using the given formatter. Read more