[][src]Trait tract_hir::infer::rules::expr::TExp

pub trait TExp<T>: Debug {
    fn get(&self, context: &Context) -> TractResult<T>;
fn set(&self, context: &mut Context, value: T) -> TractResult<bool>;
fn get_paths(&self) -> Vec<&Path>

Notable traits for Vec<u8>

impl Write for Vec<u8>
; }

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>

Notable traits for Vec<u8>

impl Write for Vec<u8>

Returns the paths that the expression depends on.

Loading content...

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>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[src]

Returns the paths that the expression depends on.

impl<T> TExp<T> for ConstantExp<T> where
    T: Factoid + Output + Clone + Debug
[src]

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>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[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]

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>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[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]

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>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[src]

Returns the paths that the rule depends on.

impl<T> TExp<T> for VariableExp<T> where
    T: Factoid + Output + Clone + Debug
[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>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[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>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[src]

Returns the paths that the expression depends on.

Loading content...