Skip to content

Commit

Permalink
added type conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
hatrit committed Nov 14, 2024
1 parent 298e2f0 commit 9d99ff2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/models/ide_secir/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Model

int get_transition_flat_index(Eigen::Index transition_idx, size_t agegroup) const
{
return (int(agegroup) * Eigen::Index(InfectionTransition::Count) + transition_idx);
return (int(agegroup) * int(InfectionTransition::Count) + int(transition_idx));
}

/**
Expand All @@ -87,7 +87,7 @@ class Model
*/
int get_state_flat_index(int state_idx, size_t agegroup) const
{
return (int(agegroup) * Eigen::Index(InfectionState::Count) + state_idx);
return (int(agegroup) * int(InfectionState::Count) + int(state_idx));
}

// ---- Functionality to calculate the sizes of the compartments for time t0. ----
Expand Down

0 comments on commit 9d99ff2

Please sign in to comment.