.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/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_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 .. raw:: html
%3 in0 in0 add0 add0 in0:e->add0 0 t0 t0 add0->t0 out0 out0 t0.0 t0.0->out0:w cmul0 cmul0 t0.0->cmul0 t0->t0.0 cmul0->add0 1


.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.092 seconds) .. _sphx_glr_download_examples_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 `_