Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
nutrients.cpp File Reference
#include "nutrients.h"
#include "HealthGPS.Core/exception.h"
#include "HealthGPS.Core/string_util.h"
#include "fmt/color.h"
#include "fmt/format.h"
#include <algorithm>
#include <iterator>
Include dependency graph for nutrients.cpp:

Namespaces

namespace  hgps
 Top-level namespace for Health-GPS Console host application.
 
namespace  hgps::detail
 Internal details namespace for private data types and functions.
 

Functions

std::vector< size_t > hgps::detail::get_nutrient_indexes (const std::vector< std::string > &column_names, const std::vector< core::Identifier > &nutrients)
 Work out which column each macronutrient is in.
 
std::unordered_map< core::Identifier, std::vector< double > > hgps::detail::get_nutrient_table (rapidcsv::Document &doc, const std::vector< core::Identifier > &nutrients, const std::vector< size_t > &nutrient_idx)
 
std::unordered_map< core::Identifier, std::vector< double > > hgps::load_nutrient_table (const std::string &csv_path, const std::vector< core::Identifier > &nutrients)
 Load nutrient information from a CSV file.