From f83e869def6608f64606aead24ad1cfbb6f5c72a Mon Sep 17 00:00:00 2001 From: hop311 Date: Tue, 16 Jul 2024 23:57:50 +0100 Subject: Add IndexedMap and use in low key count, high value density cases --- src/openvic-simulation/pop/Pop.hpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/openvic-simulation/pop/Pop.hpp') diff --git a/src/openvic-simulation/pop/Pop.hpp b/src/openvic-simulation/pop/Pop.hpp index 8ac6d4c..c74840f 100644 --- a/src/openvic-simulation/pop/Pop.hpp +++ b/src/openvic-simulation/pop/Pop.hpp @@ -10,6 +10,7 @@ #include "openvic-simulation/scripts/ConditionalWeight.hpp" #include "openvic-simulation/types/EnumBitfield.hpp" #include "openvic-simulation/types/fixed_point/FixedPoint.hpp" +#include "openvic-simulation/types/IndexedMap.hpp" namespace OpenVic { @@ -68,9 +69,9 @@ namespace OpenVic { fixed_point_t PROPERTY(literacy); - fixed_point_map_t PROPERTY(ideologies); + IndexedMap PROPERTY(ideologies); fixed_point_map_t PROPERTY(issues); - fixed_point_map_t PROPERTY(votes); + IndexedMap PROPERTY(votes); fixed_point_t PROPERTY(unemployment); fixed_point_t PROPERTY(cash); @@ -81,7 +82,7 @@ namespace OpenVic { fixed_point_t PROPERTY(everyday_needs_fulfilled); fixed_point_t PROPERTY(luxury_needs_fulfilled); - Pop(PopBase const& pop_base); + Pop(PopBase const& pop_base, decltype(ideologies)::keys_t const& ideology_keys); public: Pop(Pop const&) = delete; @@ -89,9 +90,7 @@ namespace OpenVic { Pop& operator=(Pop const&) = delete; Pop& operator=(Pop&&) = delete; - void setup_pop_test_values( - IdeologyManager const& ideology_manager, IssueManager const& issue_manager, CountryDefinition const& country - ); + void setup_pop_test_values(IssueManager const& issue_manager); void set_location(ProvinceInstance const& new_location); }; -- cgit v1.2.3-56-ga3b1