Trait rational_deduction::substitution::Substitution[][src]

pub trait Substitution<E, V = Vec<Term<E>>>: Structure<E, Structure<E, V>> where
    E: Expression,
    E::Group: FromIterator<E> + IntoIterator<Item = E>,
    V: Container<Term<E>>, 
{ type Iter: Iterator<Item = TermRef<'s, E>>; fn iter(&self) -> Self::Iter; fn is_empty(&self) -> bool { ... }
fn is_identity(&self) -> bool
    where
        E::Atom: PartialEq
, { ... }
fn get(&self, var: &E::Atom) -> Option<&E>
    where
        E::Atom: PartialEq
, { ... }
fn get_new(&self, var: &E::Atom) -> Option<E>
    where
        E::Atom: Clone + PartialEq,
        E::Group: FromIterator<E>
, { ... }
fn apply_atom(&self, atom: E::Atom) -> E
    where
        E::Atom: Clone + PartialEq,
        E::Group: FromIterator<E>
, { ... }
fn apply_atom_ref(&self, atom: &E::Atom) -> E
    where
        E::Atom: Clone + PartialEq,
        E::Group: FromIterator<E>
, { ... }
fn apply(&self, expr: E) -> E
    where
        E::Atom: Clone + PartialEq,
        E::Group: IntoIterator<Item = E> + FromIterator<E>
, { ... }
fn apply_ref(&self, expr: &E) -> E
    where
        E::Atom: Clone + PartialEq,
        E::Group: IntoIterator<Item = E> + FromIterator<E>
, { ... }
fn generate<F>(
        lhs: &E,
        rhs: &E,
        can_substitute: F
    ) -> Option<Directed<Self>>
    where
        Self: Sized,
        E::Atom: Clone + PartialEq,
        F: FnMut(&E::Atom) -> bool
, { ... } }

Substitution Trait

Associated Types

type Iter: Iterator<Item = TermRef<'s, E>>[src]

Iterator over elements by reference.

Loading content...

Required methods

fn iter(&self) -> Self::Iter[src]

Returns an iterator over the elements by reference.

Loading content...

Provided methods

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

Checks if the Substitution is empty.

fn is_identity(&self) -> bool where
    E::Atom: PartialEq
[src]

Checks if all of the elements of &self are the identity substitution.

fn get(&self, var: &E::Atom) -> Option<&E> where
    E::Atom: PartialEq
[src]

Returns corresponding expression which var completes to under substitution.

fn get_new(&self, var: &E::Atom) -> Option<E> where
    E::Atom: Clone + PartialEq,
    E::Group: FromIterator<E>, 
[src]

Returns corresponding expression which var completes to under substitution.

fn apply_atom(&self, atom: E::Atom) -> E where
    E::Atom: Clone + PartialEq,
    E::Group: FromIterator<E>, 
[src]

Performs substitution on an atomic expression.

fn apply_atom_ref(&self, atom: &E::Atom) -> E where
    E::Atom: Clone + PartialEq,
    E::Group: FromIterator<E>, 
[src]

Performs substitution on an atomic expression by reference.

fn apply(&self, expr: E) -> E where
    E::Atom: Clone + PartialEq,
    E::Group: IntoIterator<Item = E> + FromIterator<E>, 
[src]

Performs substitution on an expression.

fn apply_ref(&self, expr: &E) -> E where
    E::Atom: Clone + PartialEq,
    E::Group: IntoIterator<Item = E> + FromIterator<E>, 
[src]

Performs substitution on an expression by reference.

fn generate<F>(lhs: &E, rhs: &E, can_substitute: F) -> Option<Directed<Self>> where
    Self: Sized,
    E::Atom: Clone + PartialEq,
    F: FnMut(&E::Atom) -> bool, 
[src]

Tries to generate a substitution from two expressions.

Loading content...

Implementors

impl<E> Substitution<E, Vec<Term<E>, Global>> for Structure<E> where
    E: Expression,
    E::Group: FromIterator<E> + IntoIterator<Item = E>, 
[src]

type Iter = StructureVecIter<'s, E>

Loading content...