pub struct FunctionalDependencies { /* private fields */ }
Expand description

This object encapsulates all functional dependencies in a given relation.

Implementations§

source§

impl FunctionalDependencies

source

pub fn empty() -> Self

Creates an empty FunctionalDependencies object.

source

pub fn new(dependencies: Vec<FunctionalDependence>) -> Self

Creates a new FunctionalDependencies object from a vector of FunctionalDependence objects.

source

pub fn new_from_constraints( constraints: Option<&Constraints>, n_field: usize ) -> Self

Creates a new FunctionalDependencies object from the given constraints.

source

pub fn with_dependency(self, mode: Dependency) -> Self

source

pub fn extend(&mut self, other: FunctionalDependencies)

Merges the given functional dependencies with these.

source

pub fn add_offset(&mut self, offset: usize)

Adds the offset value to source_indices and target_indices for each functional dependency.

source

pub fn project_functional_dependencies( &self, proj_indices: &[usize], n_out: usize ) -> FunctionalDependencies

Updates source_indices and target_indices of each functional dependence using the index mapping given in proj_indices.

Assume that proj_indices is [2, 5, 8] and we have a functional dependence [5] (source_indices) -> [5, 8] (target_indices). In the updated schema, fields at indices [2, 5, 8] will transform to [0, 1, 2]. Therefore, the resulting functional dependence will be [1] -> [1, 2].

source

pub fn join( &self, other: &FunctionalDependencies, join_type: &JoinType, left_cols_len: usize ) -> FunctionalDependencies

This function joins this set of functional dependencies with the other according to the given join_type.

source

pub fn extend_target_indices(&mut self, n_out: usize)

This function ensures that functional dependencies involving uniquely occuring determinant keys cover their entire table in terms of dependent columns.

Trait Implementations§

source§

impl Clone for FunctionalDependencies

source§

fn clone(&self) -> FunctionalDependencies

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 FunctionalDependencies

source§

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

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

impl PartialEq<FunctionalDependencies> for FunctionalDependencies

source§

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

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

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

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

impl Eq for FunctionalDependencies

source§

impl StructuralEq for FunctionalDependencies

source§

impl StructuralPartialEq for FunctionalDependencies

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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<T> Allocation for Twhere T: RefUnwindSafe + Send + Sync,