Skip to main content

InferenceModelExt

Trait InferenceModelExt 

Source
pub trait InferenceModelExt {
    // Required methods
    fn analyse(&mut self, obstinate: bool) -> Result<bool, Error>;
    fn incorporate(
        self,
    ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>;
    fn missing_type_shape(&self) -> Result<Vec<OutletId>, Error>;
    fn eliminate_dead_branches(
        self,
    ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>;
    fn into_typed(self) -> Result<Graph<TypedFact, Box<dyn TypedOp>>, Error>;
    fn into_optimized(self) -> Result<Graph<TypedFact, Box<dyn TypedOp>>, Error>;
}

Required Methods§

Source

fn analyse(&mut self, obstinate: bool) -> Result<bool, Error>

Analyse all nodes of the graph.

Will stop on first error unless obstinate is true.

Source

fn incorporate( self, ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>

Perform early transformation before going typed.

Source

fn missing_type_shape(&self) -> Result<Vec<OutletId>, Error>

List OutletId with incomplete type information.

Will stop on first error unless obstinate is true.

Source

fn eliminate_dead_branches( self, ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>

Eliminate seemingly dead branches of the graph.

This may break stateful networks.

Source

fn into_typed(self) -> Result<Graph<TypedFact, Box<dyn TypedOp>>, Error>

Attempt full analyse and conversion to TypedModel.

Source

fn into_optimized(self) -> Result<Graph<TypedFact, Box<dyn TypedOp>>, Error>

Attempt full analyse, decluttering and mapping to optimized operations.

This will work even if the network can not be normalized.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§