Kernel: Python 3
%demo, the Interactive showcase
In [1]:
In this notebook we present the usage of %demo
. The %demo
syntax takes an expression or an automaton and applies an algorithm (named by its second argument) on it.
In [2]:
Usage: %demo variable algorithm
variable either an expression or an automaton.
algorithm one that is valid for the variable: [eliminate_state,
automaton]
Type %demo --help or %demo? to display this message.
Example:
e = vcsn.B.expression('(ab?){2}')
a = e.standard().lift()
%demo a eliminate_state
Once it is done it shows an interactive box where the user can play.
For the next examples we define an expression e
, for instance a+bb
:
In [3]:
Automaton
In [4]:
Eliminate State
Let define 3 lifted automata a, b and c.
In [5]:
In [6]:
In [7]:
Now we call the interactive demonstration of eliminate_state algorithm.
Play with the slider to show each step of the algorithm process.
In [8]:
In [9]:
In [10]: