Skip to content

Commit

Permalink
RewardsSimple bugfix: error in (unused) constructor with map.
Browse files Browse the repository at this point in the history
  • Loading branch information
davexparker committed Jul 18, 2024
1 parent f1644a4 commit 1de42fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prism/src/explicit/rewards/RewardsSimple.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ public <T> RewardsSimple(Rewards<T> rews, Model<?> model, Function<? super T, ?
numStates = model.getNumStates();
stateRewards = new ListSimple<>(eval.zero(), eval::isZero);
if (rews.hasStateRewards()) {
for (int s = numStates; s >= 0; s--) {
for (int s = numStates - 1; s >= 0; s--) {
stateRewards.setValue(s, rewMap.apply(rews.getStateReward(s)));
}
}
transRewards = new ListNestedSimple<>(eval.zero(), eval::isZero);
if (rews.hasTransitionRewards()) {
for (int s = numStates; s >= 0; s--) {
for (int s = numStates - 1; s >= 0; s--) {
int n;
if (model.getModelType().nondeterministic()) {
n = ((NondetModel<?>) model).getNumChoices(s);
Expand Down

0 comments on commit 1de42fa

Please sign in to comment.