Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
income_category_layout.h
Go to the documentation of this file.
1#pragma once
2
3#include "forward_type.h"
4
5#include <cstddef>
6#include <string>
7#include <string_view>
8#include <vector>
9
10namespace hgps::core {
11
14 std::size_t count{};
15 std::vector<Income> strata;
16 std::vector<std::string> labels;
17};
18
22
25std::size_t income_table_index(Income income, const IncomeCategoryLayout &layout);
26
28Income income_from_equal_split_bucket(std::size_t bucket, const IncomeCategoryLayout &layout);
29
31double income_category_numeric(Income income, const IncomeCategoryLayout &layout);
32
33} // namespace hgps::core
Top-level namespace for Health-GPS Core C++ API.
Definition analysis.h:7
std::size_t income_table_index(Income income, const IncomeCategoryLayout &layout)
Map person.income to a 0-based table index for the configured layout.
Definition income_category_layout.cpp:40
double income_category_numeric(Income income, const IncomeCategoryLayout &layout)
Project-aware numeric encoding for analysis/output (legacy 3/4 mapping preserved).
Definition income_category_layout.cpp:57
IncomeCategoryLayout income_category_layout_from_config(std::string_view categories)
Parse project_requirements.income.categories ("3", "4", or "5").
Definition income_category_layout.cpp:19
Income
Enumerates income categories.
Definition forward_type.h:51
Income income_from_equal_split_bucket(std::size_t bucket, const IncomeCategoryLayout &layout)
Map equal-split rank bucket (0..count-1) to Income enum.
Definition income_category_layout.cpp:50
Ordered final income buckets for project_requirements.income.categories (3, 4, or 5).
Definition income_category_layout.h:13
std::vector< Income > strata
Definition income_category_layout.h:15
std::vector< std::string > labels
Definition income_category_layout.h:16
std::size_t count
Definition income_category_layout.h:14