Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
mortality.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <tuple>
4 
5 namespace hgps::core {
6 
8 struct MortalityItem {
10  int location_id{};
11 
13  int at_time{};
14 
16  int with_age{};
17 
19  float males{};
20 
22  float females{};
23 
25  float total{};
26 };
27 
32 inline bool operator<(MortalityItem const &lhs, MortalityItem const &rhs) {
33  return std::tie(lhs.at_time, lhs.with_age) < std::tie(rhs.at_time, rhs.with_age);
34 }
35 
40 inline bool operator>(MortalityItem const &lhs, MortalityItem const &rhs) {
41  return std::tie(lhs.at_time, lhs.with_age) > std::tie(rhs.at_time, rhs.with_age);
42 }
43 } // namespace hgps::core
Top-level namespace for Health-GPS Core C++ API.
Definition: analysis.h:7
bool operator>(const Country &lhs, const Country &rhs)
Greater-than operation for country data type.
Definition: country.h:25
bool operator<(const Country &lhs, const Country &rhs)
Less-than operation for country data type.
Definition: country.h:31
Population mortality trends for a country data structure.
Definition: mortality.h:8
float females
Number of female deaths.
Definition: mortality.h:22
int at_time
Item reference time.
Definition: mortality.h:13
float males
Number of male deaths.
Definition: mortality.h:19
int location_id
The country unique identifier code.
Definition: mortality.h:10
float total
Total number of deaths.
Definition: mortality.h:25
int with_age
Item reference time.
Definition: mortality.h:16