Translate

Trait Translate 

Source
pub trait Translate<TI1, O1, TI2, O2>: Debug
where TI1: Fact + Clone + 'static, TI2: Fact + Clone + 'static, O1: Display + Debug + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static, O2: Display + Debug + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,
{ // Required method fn translate_node( &self, source: &Graph<TI1, O1>, node: &Node<TI1, O1>, target: &mut Graph<TI2, O2>, mapping: &HashMap<OutletId, OutletId>, ) -> Result<SmallVec<[OutletId; 4]>, Error>; // Provided methods fn translate_model( &self, source: &Graph<TI1, O1>, ) -> Result<Graph<TI2, O2>, Error> { ... } fn translate_model_with_mappings( &self, source: &Graph<TI1, O1>, ) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId>), Error> { ... } }

Required Methods§

Source

fn translate_node( &self, source: &Graph<TI1, O1>, node: &Node<TI1, O1>, target: &mut Graph<TI2, O2>, mapping: &HashMap<OutletId, OutletId>, ) -> Result<SmallVec<[OutletId; 4]>, Error>

Provided Methods§

Source

fn translate_model( &self, source: &Graph<TI1, O1>, ) -> Result<Graph<TI2, O2>, Error>

Source

fn translate_model_with_mappings( &self, source: &Graph<TI1, O1>, ) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId>), Error>

Implementors§

Source§

impl Translate<TypedFact, Box<dyn TypedOp>, TypedFact, Box<dyn TypedOp>> for SymbolValues

Source§

impl<T1, T2> Translate<TypedFact, Box<dyn TypedOp>, TypedFact, Box<dyn TypedOp>> for FloatPrecisionTranslator<T1, T2>
where T1: Datum + Float, T2: Datum + Float,

Source§

impl<TI1, O1, TI2, O2, EO, ETI> Translate<TI1, O1, TI2, O2> for IntoTranslator
where Error: From<EO> + From<ETI>, TI1: Fact + Clone + 'static, TI2: Fact + for<'a> TryFrom<&'a TI1, Error = EO> + Clone + 'static, O1: Display + Debug + Clone + AsRef<dyn Op> + AsMut<dyn Op> + 'static, O2: Display + for<'a> TryFrom<&'a O1, Error = ETI> + Debug + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static, Graph<TI2, O2>: SpecialOps<TI2, O2>,