Xiangiqgame
AI engine for Xiangqi
|
Defiition of miscellaneous free functions (and implementation of those that are templates). More...
#include <algorithm>
#include <array>
#include <config.hpp>
#include <random>
#include <string>
#include <unordered_map>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | utility_functs |
Free functions that don't clearly belong in any other namespace. | |
Functions | |
template<typename T > | |
T | utility_functs::random (T range_from, T range_to) |
bool | utility_functs::ends_with (string const &value, string const &ending) |
template<typename FromKey , typename ToKey , typename Value > | |
unordered_map< ToKey, Value > | utility_functs::replace_keys (unordered_map< FromKey, Value > orig_map, std ::unordered_map< FromKey, ToKey > key_substitutions) |
template<typename FromKey , typename ToKey , typename Value > | |
unordered_map< ToKey, Value > | utility_functs::replace_keys_forward (unordered_map< FromKey, Value > orig_map, unordered_map< FromKey, ToKey > key_substitutions) |
template<typename FromKey , typename ToKey , typename Value > | |
unordered_map< ToKey, Value > | utility_functs::replace_keys_reverse (unordered_map< FromKey, Value > orig_map, unordered_map< ToKey, FromKey > key_substitutions) |
template<typename two_d_array_t > | |
two_d_array_t | utility_functs::vertical_flip_array (two_d_array_t orig_array) |
template<typename two_d_array_t > | |
two_d_array_t | utility_functs::two_array_sum (two_d_array_t a, two_d_array_t b) |
template<typename two_d_array_t , typename array_element_t > | |
two_d_array_t | utility_functs::array_plus_const (two_d_array_t array, array_element_t offset) |
template<typename two_d_array_t , typename array_element_t > | |
bool | utility_functs::operator== (two_d_array_t &a, two_d_array_t &b) |
template<typename T > | |
bool | utility_functs::hasRepeatingPattern (const std::vector< T > &vec, int lookback_length, int period) |
template<typename T , typename M > | |
std::vector< T >::const_iterator | utility_functs::find_by_member (const std::vector< T > &vec, M T::*member, const M &value) |
const string | utility_functs::get_data_file_abs_path (const std::string data_file) |
Defiition of miscellaneous free functions (and implementation of those that are templates).
Definition in file utility_functs.hpp.