[−][src]Enum poi::Expr
Function expression.
Variants
Sym(Symbol)
A symbol that is used together with symbolic knowledge.
Ret(Value)
Some function that returns a value, ignoring the argument.
This can also be used to store values, since zero arguments is a value.
A binary operation on functions.
A tuple for more than one argument.
A list.
Implementations
impl Expr
[src]
pub fn equivalences(&self, knowledge: &[Knowledge]) -> Vec<(Expr, usize)>
[src]
Returns available equivalences of the expression, using a knowledge base.
pub fn eval(&self, knowledge: &[Knowledge]) -> Result<Expr, Error>
[src]
Evaluate an expression using a knowledge base.
This combines reductions and inlining of all symbols.
pub fn reduce_all(&self, knowledge: &[Knowledge]) -> Expr
[src]
Reduces an expression using a knowledge base, until it can not be reduces further.
pub fn reduce(&self, knowledge: &[Knowledge]) -> Result<(Expr, usize), Error>
[src]
Reduces expression one step using a knowledge base.
pub fn inline_all(&self, knowledge: &[Knowledge]) -> Result<Expr, Error>
[src]
Inlines all symbols using a knowledge base.
Ignores missing definitions in domain constraints.
pub fn inline(
&self,
sym: &Symbol,
knowledge: &[Knowledge]
) -> Result<Expr, Error>
[src]
&self,
sym: &Symbol,
knowledge: &[Knowledge]
) -> Result<Expr, Error>
Inline a symbol using a knowledge base.
pub fn has_constraint(&self, arity_level: usize) -> bool
[src]
Returns true
if has constraints.
Trait Implementations
impl Clone for Expr
[src]
impl Debug for Expr
[src]
impl Display for Expr
[src]
impl Into<Expr> for bool
[src]
impl Into<Expr> for f64
[src]
impl<T, U> Into<Expr> for (T, U) where
T: Into<Expr>,
U: Into<Expr>,
[src]
T: Into<Expr>,
U: Into<Expr>,
impl<T0, T1, T2> Into<Expr> for (T0, T1, T2) where
T0: Into<Expr>,
T1: Into<Expr>,
T2: Into<Expr>,
[src]
T0: Into<Expr>,
T1: Into<Expr>,
T2: Into<Expr>,
impl Into<Expr> for Symbol
[src]
impl Into<Expr> for &'static str
[src]
impl PartialEq<Expr> for Expr
[src]
impl StructuralPartialEq for Expr
[src]
Auto Trait Implementations
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,