[−][src]Trait tract_hir::infer::rules::expr::TExp
An expression that can be compared by the solver.
Required methods
fn get(&self, context: &Context) -> TractResult<T>
Returns the current value of the expression in the given context.
fn set(&self, context: &mut Context, value: T) -> TractResult<bool>
Tries to set the value of the expression in the given context.
fn get_paths(&self) -> Vec<&Path>ⓘ
Returns the paths that the expression depends on.
Implementors
impl TExp<GenericFactoid<TDim>> for IntoDimExp
[src]
fn get(&self, context: &Context) -> TractResult<DimFact>
[src]
Returns the current value of the expression in the given context.
fn set(&self, context: &mut Context, value: DimFact) -> TractResult<bool>
[src]
Tries to set the value of the expression in the given context.
fn get_paths(&self) -> Vec<&Path>ⓘ
[src]
Returns the paths that the expression depends on.
impl<T> TExp<T> for ConstantExp<T> where
T: Factoid + Output + Clone + Debug,
[src]
T: Factoid + Output + Clone + Debug,
fn get(&self, _: &Context) -> TractResult<T>
[src]
Returns the current value of the expression in the given context.
fn set(&self, _: &mut Context, value: T) -> TractResult<bool>
[src]
Tries to set the value of the expression in the given context.
fn get_paths(&self) -> Vec<&Path>ⓘ
[src]
Returns the paths that the expression depends on.
impl<T> TExp<T> for ScaledExp<T> where
T: Factoid + Output + Zero + Mul<i32, Output = T> + Div<i32, Output = T> + Clone,
[src]
T: Factoid + Output + Zero + Mul<i32, Output = T> + Div<i32, Output = T> + Clone,
fn get(&self, context: &Context) -> TractResult<T>
[src]
Returns the current value of the expression in the given context.
fn set(&self, context: &mut Context, value: T) -> TractResult<bool>
[src]
Tries to set the value of the expression in the given context.
fn get_paths(&self) -> Vec<&Path>ⓘ
[src]
Returns the paths that the expression depends on.
impl<T> TExp<T> for SumExp<T> where
T: Factoid + Output + Zero + Add<T> + Neg<Output = T> + Clone + Debug + 'static,
[src]
T: Factoid + Output + Zero + Add<T> + Neg<Output = T> + Clone + Debug + 'static,
fn get(&self, context: &Context) -> TractResult<T>
[src]
Returns the current value of the expression in the given context.
fn set(&self, context: &mut Context, value: T) -> TractResult<bool>
[src]
Tries to set the value of the expression in the given context.
fn get_paths(&self) -> Vec<&Path>ⓘ
[src]
Returns the paths that the rule depends on.
impl<T> TExp<T> for VariableExp<T> where
T: Factoid + Output + Clone + Debug,
[src]
T: Factoid + Output + Clone + Debug,
fn get(&self, context: &Context) -> TractResult<T>
[src]
Returns the current value of the expression in the given context.
fn set(&self, context: &mut Context, value: T) -> TractResult<bool>
[src]
Tries to set the value of the expression in the given context.
fn get_paths(&self) -> Vec<&Path>ⓘ
[src]
Returns the paths that the expression depends on.
impl<T: Factoid + Output + Clone + Debug> TExp<T> for Exp<T>
[src]
fn get(&self, context: &Context) -> TractResult<T>
[src]
Returns the current value of the expression in the given context.
fn set(&self, context: &mut Context, value: T) -> TractResult<bool>
[src]
Tries to set the value of the expression in the given context.
fn get_paths(&self) -> Vec<&Path>ⓘ
[src]
Returns the paths that the expression depends on.