Xiangiqgame
AI engine for Xiangqi
|
Free functions that don't clearly belong in any other namespace. More...
Functions | |
template<typename T > | |
T | random (T range_from, T range_to) |
bool | ends_with (string const &value, string const &ending) |
template<typename FromKey , typename ToKey , typename Value > | |
unordered_map< ToKey, Value > | 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 > | 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 > | 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 | vertical_flip_array (two_d_array_t orig_array) |
template<typename two_d_array_t > | |
two_d_array_t | 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 | array_plus_const (two_d_array_t array, array_element_t offset) |
template<typename two_d_array_t , typename array_element_t > | |
bool | operator== (two_d_array_t &a, two_d_array_t &b) |
template<typename T > | |
bool | hasRepeatingPattern (const std::vector< T > &vec, int lookback_length, int period) |
template<typename T , typename M > | |
std::vector< T >::const_iterator | find_by_member (const std::vector< T > &vec, M T::*member, const M &value) |
const string | get_data_file_abs_path (const std::string data_file) |
Free functions that don't clearly belong in any other namespace.
two_d_array_t utility_functs::array_plus_const | ( | two_d_array_t | array, |
array_element_t | offset | ||
) |
Definition at line 93 of file utility_functs.hpp.
|
inline |
Definition at line 28 of file utility_functs.hpp.
std::vector< T >::const_iterator utility_functs::find_by_member | ( | const std::vector< T > & | vec, |
M T::* | member, | ||
const M & | value | ||
) |
Definition at line 149 of file utility_functs.hpp.
const std::string utility_functs::get_data_file_abs_path | ( | const std::string | data_file | ) |
Definition at line 9 of file utility_functs.cpp.
bool utility_functs::hasRepeatingPattern | ( | const std::vector< T > & | vec, |
int | lookback_length, | ||
int | period | ||
) |
Definition at line 119 of file utility_functs.hpp.
bool utility_functs::operator== | ( | two_d_array_t & | a, |
two_d_array_t & | b | ||
) |
Definition at line 104 of file utility_functs.hpp.
T utility_functs::random | ( | T | range_from, |
T | range_to | ||
) |
Definition at line 21 of file utility_functs.hpp.
unordered_map< ToKey, Value > utility_functs::replace_keys | ( | unordered_map< FromKey, Value > | orig_map, |
std ::unordered_map< FromKey, ToKey > | key_substitutions | ||
) |
Definition at line 35 of file utility_functs.hpp.
unordered_map< ToKey, Value > utility_functs::replace_keys_forward | ( | unordered_map< FromKey, Value > | orig_map, |
unordered_map< FromKey, ToKey > | key_substitutions | ||
) |
Definition at line 49 of file utility_functs.hpp.
unordered_map< ToKey, Value > utility_functs::replace_keys_reverse | ( | unordered_map< FromKey, Value > | orig_map, |
unordered_map< ToKey, FromKey > | key_substitutions | ||
) |
Definition at line 63 of file utility_functs.hpp.
two_d_array_t utility_functs::two_array_sum | ( | two_d_array_t | a, |
two_d_array_t | b | ||
) |
Definition at line 82 of file utility_functs.hpp.
two_d_array_t utility_functs::vertical_flip_array | ( | two_d_array_t | orig_array | ) |
Definition at line 75 of file utility_functs.hpp.