.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/creating_and_transforming_sfgs/introduction.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_creating_and_transforming_sfgs_introduction.py: ========================================== Introduction example for the TSTE87 course ========================================== .. GENERATED FROM PYTHON SOURCE LINES 6-20 .. code-block:: Python from b_asic.core_operations import Addition, ConstantMultiplication from b_asic.sfg import SFG from b_asic.special_operations import Delay, Input, Output i = Input() d = Delay() o = Output(d) c = ConstantMultiplication(0.5, d) a = Addition(i, c) d.input(0).connect(a) sfg = SFG(i, o) .. GENERATED FROM PYTHON SOURCE LINES 21-22 The SFG looks like: .. GENERATED FROM PYTHON SOURCE LINES 22-23 .. code-block:: Python sfg .. image-sg:: /examples/creating_and_transforming_sfgs/images/sphx_glr_introduction_001.png :alt: introduction :srcset: /examples/creating_and_transforming_sfgs/images/sphx_glr_introduction_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.015 seconds) .. _sphx_glr_download_examples_creating_and_transforming_sfgs_introduction.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: introduction.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: introduction.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: introduction.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_