mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Fixed a bug in find_max_factor_graph_viterbi() which sometimes
occurred when the model order was larger than the number of variables.
This commit is contained in:
parent
3a5f99f497
commit
34dbc02d97
@ -18,7 +18,7 @@ namespace dlib
|
||||
{
|
||||
struct viterbi_data
|
||||
{
|
||||
viterbi_data() :val(0), back_index(0) {}
|
||||
viterbi_data() :val(-std::numeric_limits<double>::infinity()), back_index(0) {}
|
||||
double val;
|
||||
unsigned long back_index;
|
||||
};
|
||||
|
@ -187,8 +187,17 @@ namespace
|
||||
do_test<0,3,8>();
|
||||
do_test<4,3,1>();
|
||||
do_test<4,3,0>();
|
||||
do_test<0,3,0>();
|
||||
|
||||
do_test<3,2,1>();
|
||||
do_test<3,2,0>();
|
||||
do_test<3,2,2>();
|
||||
do_test<2,2,1>();
|
||||
do_test_negative<3,2,1>();
|
||||
do_test_negative<3,2,0>();
|
||||
do_test_negative<3,2,2>();
|
||||
do_test_negative<2,2,1>();
|
||||
|
||||
do_test<0,3,0>();
|
||||
do_test<1,2,8>();
|
||||
do_test<2,2,7>();
|
||||
do_test<3,2,8>();
|
||||
|
Loading…
Reference in New Issue
Block a user