ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Map.hpp File Reference
#include <vector>
#include <map>
#include <set>

Go to the source code of this file.

Namespaces

namespace  ppforest2
 
namespace  ppforest2::utils
 Utility functions for std::map manipulation.
 

Functions

template<typename K, typename V>
std::map< V, std::set< K > > ppforest2::utils::invert (std::map< K, V > const &map)
 Invert a map: values become keys, original keys are grouped into sets.
 
template<typename K, typename V>
std::set< K > ppforest2::utils::keys (std::map< K, V > const &map)
 Extract all keys from a map as a set.
 
template<typename K, typename V>
std::set< V > ppforest2::utils::values (std::map< K, V > const &map)
 Extract all values from a map as a set.