Struct lattices::ght::GhtInner

source ·
pub struct GhtInner<Head, Node>
where Head: Clone, Node: GeneralizedHashTrieNode,
{ /* private fields */ }
Expand description

internal node of a HashTrie

Trait Implementations§

source§

impl<Head, Node> Clone for GhtInner<Head, Node>
where Head: Clone + Clone, Node: GeneralizedHashTrieNode + Clone,

source§

fn clone(&self) -> GhtInner<Head, Node>

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<Head, Node> ColtForestNode for GhtInner<Head, Node>
where Head: 'static + Hash + Eq + Clone, Node: 'static + ColtForestNode, <Node as GeneralizedHashTrieNode>::Schema: SplitBySuffix<(Head, <Node as GeneralizedHashTrieNode>::SuffixSchema)>,

source§

type Force = Node

result of forceing a node
source§

fn force(self) -> Option<Self::Force>

Force the generation of a parent node, as in the Wang/Willsey/Suciu COLT structure, to be merged into the next trie to the right.
source§

fn force_drain(&mut self) -> Option<Self::Force>

Force the generation of a parent node but retain ref to this node
source§

impl<Head, Schema, ValType, Storage> ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>> for (&mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, ())
where GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head> + GhtGet, GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema, Storage = Storage>, Head: Clone + Eq + Hash, Schema: Clone + Eq + Hash + VariadicExt, Storage: VariadicCollection<Schema = Schema>,

source§

fn merge( &mut self, inner_to_merge: GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, )

merge an inner node into the head of this tail of the forest
source§

impl<'a, Head, Rest, Schema, ValType, Storage> ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>> for (&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, Rest)
where Rest: ColtGet<Head = Head, Schema = Schema, Storage = Storage>, Head: Eq + Hash + Clone, Schema: Eq + Hash + Clone + PartialEqVariadic + 'static + VariadicExt + SplitBySuffix<ValType>, ValType: Eq + Hash + Clone + PartialEqVariadic, Storage: VariadicCollection<Schema = Schema>, (&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, Rest): ColtGet<Head = Head, Schema = Schema, Storage = Storage>, GhtLeaf<Schema, ValType, Storage>: GeneralizedHashTrieNode<Schema = Schema>, <Schema as SplitBySuffix<ValType>>::Prefix: Eq + Hash + Clone, GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head, Schema = Schema, Storage = Storage> + GhtGet,

source§

fn merge( &mut self, inner_to_merge: GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>, )

merge an inner node into the head of this tail of the forest
source§

impl<Head, Node> Debug for GhtInner<Head, Node>
where Head: Clone + Debug, Node: GeneralizedHashTrieNode + Debug,

source§

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

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

impl<Head, Node> Default for GhtInner<Head, Node>
where Head: Clone, Node: GeneralizedHashTrieNode,

source§

fn default() -> Self

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

impl<Head, Node> FromIterator<<Node as GeneralizedHashTrieNode>::Schema> for GhtInner<Head, Node>
where Head: 'static + Hash + Eq + Clone, Node: 'static + GeneralizedHashTrieNode + Clone, Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,

source§

fn from_iter<Iter: IntoIterator<Item = Node::Schema>>(iter: Iter) -> Self

Creates a value from an iterator. Read more
source§

impl<Head, Node> GeneralizedHashTrieNode for GhtInner<Head, Node>
where Head: 'static + Hash + Eq + Clone, Node: 'static + GeneralizedHashTrieNode, Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,

source§

type Schema = <Node as GeneralizedHashTrieNode>::Schema

Schema variadic: the schema of the relation stored in this trie.
source§

type KeyType = <Node as GeneralizedHashTrieNode>::KeyType

The prefix of columns in Self::Schema that the trie is keyed on
source§

type ValType = <Node as GeneralizedHashTrieNode>::ValType

The suffix of columns in Self::Schema that are not part of the trie keys
source§

type Storage = <Node as GeneralizedHashTrieNode>::Storage

The type that holds the data in the leaves
source§

type SuffixSchema = (Head, <Node as GeneralizedHashTrieNode>::SuffixSchema)

SuffixSchema variadic: the suffix of Self::Schema from this node of the trie downward. The first entry in this variadic is of type Self::Head.
source§

type Head = Head

The first field in Self::SuffixSchema, and the key for the next node in the trie.
source§

fn new_from(input: impl IntoIterator<Item = Self::Schema>) -> Self

Create a new Ght from the iterator.
source§

fn merge_node(&mut self, other: Self) -> bool

Merge a matching Ght node into this node
source§

const HEIGHT: usize = _

The height of this node in the GhT. Leaf = 0.
source§

fn insert(&mut self, row: Self::Schema) -> bool

Inserts an item into the hash trie.
source§

fn contains<'a>( &'a self, row: <Self::Schema as VariadicExt>::AsRefVar<'a>, ) -> bool

Returns true if the (entire) row is found below in the trie, false otherwise. See GhtGet::get to look just for “head” keys in this node
source§

fn recursive_iter( &self, ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>

Iterate through (entire) rows stored in this HashTrie.
source§

fn find_containing_leaf( &self, row: <Self::Schema as VariadicExt>::AsRefVar<'_>, ) -> Option<&GhtLeaf<Self::Schema, Self::ValType, Self::Storage>>

return the leaf below that contains this row, or None if not found.
source§

fn into_iter(self) -> Option<impl Iterator<Item = Self::Schema>>

into_iter for leaf elements, or None for inner nodes
source§

fn drain(&mut self) -> Option<impl Iterator<Item = Self::Schema>>

pull all the data out of this trie node but retain the reference
source§

fn height(&self) -> usize

Report the height of this node. This is the length of path from this node to a leaf - 1. E.g. if we have GhtInner<GhtInner<GhtLeaf…>> the height is 2 This is a static property of the type of this node, so simply invokes the static method.
source§

impl<Head, Node> GhtGet for GhtInner<Head, Node>
where Head: 'static + Eq + Hash + Clone, Node: 'static + GeneralizedHashTrieNode, Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,

source§

type Get = Node

Type returned by Self::get.

source§

fn get<'a>(&'a self, head: &Self::Head) -> Option<&'a Self::Get>

On an Inner node, retrieves the value (child) associated with the given “head” key. returns an Option containing a reference to the value if found, or None if not found. On a Leaf node, returns None.

source§

fn get_mut<'a>(&'a mut self, head: &Self::Head) -> Option<&'a mut Self::Get>

get, but mutable output
source§

fn iter(&self) -> impl Iterator<Item = Self::Head>

Iterator for the “head” keys (from inner nodes) or nothing (from leaf nodes).
source§

fn iter_tuples( &self, ) -> impl Iterator<Item = <Self::Schema as VariadicExt>::AsRefVar<'_>>

Iterator for the tuples (from leaf nodes) or nothing (from inner nodes).
source§

impl<'k, Head, Node, PrefixRest> GhtPrefixIter<(&'k Head, PrefixRest)> for GhtInner<Head, Node>
where Head: Eq + Hash + Clone, Node: GeneralizedHashTrieNode + GhtPrefixIter<PrefixRest>,

source§

type Item = <Node as GhtPrefixIter<PrefixRest>>::Item

the schema output
source§

fn prefix_iter<'a>( &'a self, prefix: (&'k Head, PrefixRest), ) -> impl Iterator<Item = <Self::Item as VariadicExt>::AsRefVar<'a>>
where Self::Item: 'a,

given a prefix, return an iterator through the items below
source§

impl<Head, Node> GhtPrefixIter<()> for GhtInner<Head, Node>

source§

type Item = <GhtInner<Head, Node> as GeneralizedHashTrieNode>::Schema

the schema output
source§

fn prefix_iter<'a>( &'a self, _prefix: (), ) -> impl Iterator<Item = <Self::Item as VariadicExt>::AsRefVar<'a>>
where Self::Item: 'a,

given a prefix, return an iterator through the items below
source§

impl<Head, Node> IsBot for GhtInner<Head, Node>
where Head: Clone, Node: GeneralizedHashTrieNode + IsBot,

source§

fn is_bot(&self) -> bool

Returns if self is lattice bottom (⊥). Read more
source§

impl<Head, Node> IsTop for GhtInner<Head, Node>
where Head: Clone, Node: GeneralizedHashTrieNode, Node::Storage: VariadicSet<Schema = Node::Schema>,

source§

fn is_top(&self) -> bool

Returns if self is lattice top (⊤). Read more
source§

impl<Head, Node> Merge<GhtInner<Head, Node>> for GhtInner<Head, Node>
where Node: GeneralizedHashTrieNode + Merge<Node>, Node::Storage: VariadicSet<Schema = Node::Schema>, Self: GeneralizedHashTrieNode, Head: Hash + Eq + Clone,

source§

fn merge(&mut self, other: GhtInner<Head, Node>) -> bool

Merge other into the self lattice. Read more
source§

fn merge_owned(this: Self, delta: Other) -> Self
where Self: Sized,

Merge this and delta together, returning the new value.
source§

impl<Head, Node> PartialEq for GhtInner<Head, Node>
where Head: Hash + Eq + 'static + Clone, Node: GeneralizedHashTrieNode + 'static + PartialEq, Node::Storage: VariadicSet<Schema = Node::Schema>, Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>, GhtInner<Head, Node>: GhtGet, <GhtInner<Head, Node> as GhtGet>::Get: PartialEq,

source§

fn eq(&self, other: &GhtInner<Head, Node>) -> 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<Head, Node> PartialOrd for GhtInner<Head, Node>
where Head: Hash + Eq + 'static + Clone, Node: 'static + GeneralizedHashTrieNode + PartialEq + PartialOrd, Node::Storage: VariadicSet<Schema = Node::Schema>, Node::Schema: SplitBySuffix<(Head, Node::SuffixSchema)>,

source§

fn partial_cmp(&self, other: &GhtInner<Head, Node>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<Head, Node> LatticeOrd for GhtInner<Head, Node>
where Self: PartialOrd<GhtInner<Head, Node>>, Head: Clone, Node: GeneralizedHashTrieNode, Node::Storage: VariadicSet<Schema = Node::Schema>,

Auto Trait Implementations§

§

impl<Head, Node> Freeze for GhtInner<Head, Node>

§

impl<Head, Node> RefUnwindSafe for GhtInner<Head, Node>
where Head: RefUnwindSafe, Node: RefUnwindSafe,

§

impl<Head, Node> Send for GhtInner<Head, Node>
where Head: Send, Node: Send,

§

impl<Head, Node> Sync for GhtInner<Head, Node>
where Head: Sync, Node: Sync,

§

impl<Head, Node> Unpin for GhtInner<Head, Node>
where Head: Unpin, Node: Unpin,

§

impl<Head, Node> UnwindSafe for GhtInner<Head, Node>
where Head: UnwindSafe, Node: UnwindSafe,

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.

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<This, Other> NaiveLatticeOrd<Other> for This
where This: Clone + Merge<Other>, Other: Clone + Merge<This>,

source§

fn naive_cmp(&self, other: &Rhs) -> Option<Ordering>

Naive compare based on the Merge::merge method. This method can be very inefficient; use PartialOrd::partial_cmp instead. Read more
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.
source§

impl<T> Lattice for T