[−][src]Trait tract_nnef::prelude::translator::Translate
Required methods
fn translate_node(
&self,
source: &Graph<TI1, O1>,
node: &BaseNode<TI1, O1>,
target: &mut Graph<TI2, O2>,
mapping: &HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>
&self,
source: &Graph<TI1, O1>,
node: &BaseNode<TI1, O1>,
target: &mut Graph<TI2, O2>,
mapping: &HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>
Provided methods
fn translate_model(
&self,
source: &Graph<TI1, O1>
) -> Result<Graph<TI2, O2>, TractError>
&self,
source: &Graph<TI1, O1>
) -> Result<Graph<TI2, O2>, TractError>
fn translate_model_with_mappings(
&self,
source: &Graph<TI1, O1>
) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId, RandomState>), TractError>
&self,
source: &Graph<TI1, O1>
) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId, RandomState>), TractError>
Implementors
impl<TI1, O1, TI2, O2, EO, ETI> Translate<TI1, O1, TI2, O2> for IntoTranslator where
O1: Display + Debug + Clone + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + 'static + Hash,
O2: Display + for<'a> TryFrom<&'a O1, Error = ETI> + Debug + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + Hash + 'static,
TI1: Fact + Hash + Clone + 'static,
TI2: Fact + Hash + for<'a> TryFrom<&'a TI1, Error = EO> + Clone + 'static,
TractError: From<EO>,
TractError: From<ETI>,
Graph<TI2, O2>: SpecialOps<TI2, O2>,
[src]
O1: Display + Debug + Clone + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + 'static + Hash,
O2: Display + for<'a> TryFrom<&'a O1, Error = ETI> + Debug + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + Hash + 'static,
TI1: Fact + Hash + Clone + 'static,
TI2: Fact + Hash + for<'a> TryFrom<&'a TI1, Error = EO> + Clone + 'static,
TractError: From<EO>,
TractError: From<ETI>,
Graph<TI2, O2>: SpecialOps<TI2, O2>,
fn translate_node(
&self,
source: &Graph<TI1, O1>,
node: &BaseNode<TI1, O1>,
target: &mut Graph<TI2, O2>,
mapping: &HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>
[src]
&self,
source: &Graph<TI1, O1>,
node: &BaseNode<TI1, O1>,
target: &mut Graph<TI2, O2>,
mapping: &HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>