Skip to content

Commit 473766a

Browse files
AMR-KELEGTinoDidriksen
authored andcommitted
Fix the analysis weight computation bug
When computing the overall weight of an analysis, The weight of the final state was ignored.
1 parent 9afd7fb commit 473766a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lttoolbox/state.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,9 @@ State::filterFinals(map<Node *, double> const &finals,
600600
cost += ((*(state[i].sequence))[j]).second;
601601
}
602602
}
603+
604+
// Add the weight of the final state
605+
cost += (*(finals.find(state[i].where))).second;
603606
response.push_back(make_pair(result, cost));
604607
}
605608
}

0 commit comments

Comments
 (0)