-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group by discrete variables #405
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,41 +276,41 @@ | |
auto current_time = static_cast<unsigned int>(context.time_now()); | ||
for (const auto &entity : context.population()) { | ||
auto age = entity.age; | ||
auto gender = entity.gender; | ||
auto over_18 = entity.over_18; | ||
Check failure on line 279 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
Check failure on line 279 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
|
||
if (!entity.is_active()) { | ||
if (!entity.is_alive() && entity.time_of_death() == current_time) { | ||
series(gender, "deaths").at(age)++; | ||
auto expcted_life = definition_.life_expectancy().at(context.time_now(), gender); | ||
series(gender, "yll").at(age) += std::max(expcted_life - age, 0.0f) * DALY_UNITS; | ||
series(over_18, "deaths").at(age)++; | ||
Check failure on line 283 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "deaths").at(age)++;
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
auto expcted_life = definition_.life_expectancy().at(context.time_now(), over_18); | ||
Check failure on line 284 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching member function for call to 'at' [clang-diagnostic-error] auto expcted_life = definition_.life_expectancy().at(context.time_now(), over_18);
^ Additional contextsrc/HealthGPS/gender_table.h:72: candidate function not viable: no known conversion from 'bool' to 'const core::Gender' for 2nd argument const TYPE &at(const ROW row, const core::Gender gender) const {
^ src/HealthGPS/gender_table.h:63: candidate function not viable: 'this' argument has type 'const GenderTable<int, float>', but method is not marked const TYPE &at(const ROW row, const core::Gender gender) {
^ |
||
series(over_18, "yll").at(age) += std::max(expcted_life - age, 0.0f) * DALY_UNITS; | ||
Check failure on line 285 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "yll").at(age) += std::max(expcted_life - age, 0.0f) * DALY_UNITS;
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
} | ||
|
||
if (entity.has_emigrated() && entity.time_of_migration() == current_time) { | ||
series(gender, "migrations").at(age)++; | ||
series(over_18, "migrations").at(age)++; | ||
Check failure on line 289 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "migrations").at(age)++;
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
} | ||
|
||
continue; | ||
} | ||
|
||
series(gender, "count").at(age)++; | ||
series(over_18, "count").at(age)++; | ||
Check failure on line 295 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "count").at(age)++;
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
|
||
for (const auto &factor : context.mapping().entries()) { | ||
series(gender, factor.key().to_string()).at(age) += | ||
series(over_18, factor.key().to_string()).at(age) += | ||
Check failure on line 298 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, factor.key().to_string()).at(age) +=
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
entity.get_risk_factor_value(factor.key()); | ||
} | ||
|
||
for (const auto &[disease_name, disease_state] : entity.diseases) { | ||
if (disease_state.status == DiseaseStatus::active) { | ||
series(gender, "prevalence_" + disease_name.to_string()).at(age)++; | ||
series(over_18, "prevalence_" + disease_name.to_string()).at(age)++; | ||
Check failure on line 304 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "prevalence_" + disease_name.to_string()).at(age)++;
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
if (disease_state.start_time == context.time_now()) { | ||
series(gender, "incidence_" + disease_name.to_string()).at(age)++; | ||
series(over_18, "incidence_" + disease_name.to_string()).at(age)++; | ||
Check failure on line 306 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "incidence_" + disease_name.to_string()).at(age)++;
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
} | ||
} | ||
} | ||
|
||
auto dw = calculate_disability_weight(entity); | ||
series(gender, "disability_weight").at(age) += dw; | ||
series(gender, "yld").at(age) += (dw * DALY_UNITS); | ||
series(over_18, "disability_weight").at(age) += dw; | ||
Check failure on line 312 in src/HealthGPS/analysis_module.cpp GitHub Actions / Build and test (linux, ubuntu-22.04, gcc-latest, false)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "disability_weight").at(age) += dw;
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
series(over_18, "yld").at(age) += (dw * DALY_UNITS); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no matching function for call to object of type 'hgps::DataSeries' [clang-diagnostic-error] series(over_18, "yld").at(age) += (dw * DALY_UNITS);
^ Additional contextsrc/HealthGPS/data_series.h:29: candidate function not viable: no known conversion from 'bool' to 'core::Gender' for 1st argument std::vector<double> &operator()(core::Gender gender, const std::string &key);
^ |
||
|
||
classify_weight(series, entity); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: reference to non-static member function must be called; did you mean to call it with no arguments? [clang-diagnostic-error]