Initial commit

This commit is contained in:
2026-01-24 16:10:02 -05:00
parent e053f094b3
commit cf4020fa08
10 changed files with 267 additions and 0 deletions

19
Map.h Normal file
View File

@@ -0,0 +1,19 @@
#ifndef MAP_UTIL_H
#define MAP_UTIL_H
#include <unordered_map>
#include <vector>
// Get vector of values from an unordered_map
template <typename K, typename V, typename H>
std::vector<V> map_to_values(const std::unordered_map<K, V, H> &map) {
std::vector<V> out;
out.reserve(map.size());
for (auto const &[key, value] : map) {
out.push_back(value);
}
return out;
}
#endif // MAP_UTIL_H