Achilleas and Eric,
I have attached a patch to trellis_viterbi_X.cc.t,
trellis_viterbi_X.i.t and trellis_viterbi_X.h.t
This patch allows for multiple initial and/or final states by calling
viterbi with a vector for S0 and/or SK. The call is overloaded so
that viterbi can still be called with a scalar. The two accessor
methods for d_S0 and d_SK still work for scalars but just return the
first element if S0 or SK are vectors. I was not sure how to overload
this based on return type.
I would be happy to write a patch for the test code qa_trellis.py but
it does not seem to have a test for viterbi right now.
I would also be happy to write a patch for the documentation
gr_trellis.xml (was this written by hand or machine generated?)
I don't think there was any bounds checking for the scalar call with
S0 and SK so I did not add any for the vector call. i.e. you can call
viterbi with a value for SK that is greater than the number of states.
Tim