automaton
.weight_series
¶Compute the sum of all the weights of the behavior. Find weighted distance between initial and final states.
Implementations:
import vcsn
%%automaton a
context = "lal_char, zmin"
$ -> 0
0 -> 1 <6>a
0 -> 2 <1>a
2 -> 3 <1>b
3 -> 4 <1>c
4 -> 1 <1>d
0 -> 5 <2>a
5 -> 1 <3>b
1 -> $
a.weight_series()
%%automaton b
context = "lal_char, q"
$ -> 0
0 -> 1 <6>a
0 -> 2 <1>a
2 -> 3 <1>b
3 -> 4 <1>c
4 -> 1 <1>d
0 -> 5 <2>a
5 -> 1 <3>b
1 -> $
b.weight_series()