CepGen 1.2.5
Central exclusive processes event generator
|
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | cepgen |
Common namespace for this Monte Carlo generator. | |
namespace | cepgen::utils |
Collection of utilities. | |
Functions | |
template<typename K , typename T > | |
std::vector< K > | keys (const std::map< K, T > &coll) |
Retrieve all keys from a map. | |
template<typename K , typename T > | |
std::vector< K > | keys (const std::unordered_map< K, T > &coll) |
Retrieve all keys from an unordered map. | |
template<typename T > | |
bool | contains (const std::vector< T > &coll, const T &item) |
Check if a vector contains an item. | |
template<typename T > | |
bool | contains (const std::set< T > &coll, const T &item) |
Check if a set contains an item. | |
template<typename K , typename T > | |
bool | contains (const std::unordered_map< K, T > &coll, const T &item) |
Check if an unordered map contains an item. | |
template<typename T > | |
void | normalise (std::vector< T > &coll) |
Remove duplicates and sort a collection. | |
template<typename T > | |
bool | uniform (const std::vector< T > &coll) |
Check if all elements of a collection are uniform. | |