Skip to content
Snippets Groups Projects

Resolve "Replacing Operations in SFG"

Merged Jacob Wahlman requested to merge 15-replacing-operations-in-sfg into develop
All threads resolved!
2 files
+ 84
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -350,6 +350,18 @@ class SFG(AbstractOperation):
input_values.append(self._evaluate_source(input_src))
return src.operation.evaluate_output(src.index, input_values)
def replace_component(self, component_type, _id=None, _type=None):
"""Find and replace all components matching either on GraphID, Type or both.
Then return a new deepcopy of the sfg with the replaced component.
Arguments:
component_type: The type of the new component, e.g Multiplication
Keyword arguments:
_id: The GraphID to match the component to replace.
_type: The Type to match the component to replace.
"""
pass
def __str__(self):
"""Prints operations, inputs and outputs in a SFG
Loading