Skip to content

Commit

Permalink
Fix the analysis weight computation bug
Browse files Browse the repository at this point in the history
When computing the overall weight of an analysis,
The weight of the final state was ignored.
Fix #44
  • Loading branch information
AMR-KELEG authored and TinoDidriksen committed Apr 3, 2019
1 parent 9afd7fb commit 6703481
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lttoolbox/state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ State::filterFinals(map<Node *, double> const &finals,
cost += ((*(state[i].sequence))[j]).second;
}
}

// Add the weight of the final state
cost += (*(finals.find(state[i].where))).second;
response.push_back(make_pair(result, cost));
}
}
Expand Down

0 comments on commit 6703481

Please sign in to comment.