Return a (finite) approximation of the series denoted by the expression.
This is equivalent to calling expression.derived_term().shortest
. See its documentation for more details.
See also:
In [1]:
import vcsn
In [2]:
e = vcsn.B.expression('[ab]*a[ab]')
e.shortest()
Out[2]:
In [3]:
e.shortest(4)
Out[3]:
In [4]:
e.shortest(len = 4)
Out[4]:
In [5]:
e.shortest(num = 10, len = 4)
Out[5]:
In [6]:
e.shortest(num = 10, len = 3)
Out[6]:
In [7]:
e = vcsn.Z.expression('(<2>a)*')
e.shortest(len = 3)
Out[7]:
In [8]:
e.shortest(num = 10)
Out[8]: