Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
nutrients.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "rapidcsv.h"
6
7#include <unordered_map>
8#include <vector>
9
10namespace hgps {
11namespace detail {
16std::vector<size_t> get_nutrient_indexes(const std::vector<std::string> &column_names,
17 const std::vector<core::Identifier> &nutrients);
18
19std::unordered_map<core::Identifier, std::vector<double>>
20get_nutrient_table(rapidcsv::Document &doc, const std::vector<core::Identifier> &nutrients,
21 const std::vector<size_t> &nutrient_idx);
22} // namespace detail
23
28std::unordered_map<core::Identifier, std::vector<double>>
29load_nutrient_table(const std::string &csv_path, const std::vector<core::Identifier> &nutrients);
30} // namespace hgps
std::unordered_map< core::Identifier, std::vector< double > > get_nutrient_table(rapidcsv::Document &doc, const std::vector< core::Identifier > &nutrients, const std::vector< size_t > &nutrient_idx)
Definition nutrients.cpp:42
std::vector< size_t > get_nutrient_indexes(const std::vector< std::string > &column_names, const std::vector< core::Identifier > &nutrients)
Work out which column each macronutrient is in.
Definition nutrients.cpp:14
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:8
std::unordered_map< core::Identifier, std::vector< double > > load_nutrient_table(const std::string &csv_path, const std::vector< core::Identifier > &nutrients)
Load nutrient information from a CSV file.
Definition nutrients.cpp:62