64# define GUM_CAST dynamic_cast
66# define GUM_CAST static_cast
87 template <
typename T1,
typename T2 >
88 ostream&
operator<<(ostream& stream,
const pair< T1, T2 >& val);
97 template <
typename T0,
typename... T >
98 std::ostream&
operator<<(std::ostream& os,
const std::tuple< T0, T... >& t);
108 template <
typename T >
109 ostream&
operator<<(ostream& stream,
const vector< T >& val);
117 template <
typename T >
142 template <
typename T1,
typename T2 >
143 using forbidden_type =
typename std::enable_if< !std::is_same< T1, T2 >::value,
int >::type;
159 bool Memcmp(
const void*
const in_,
const void*
const out_,
unsigned long size);
170 template <
typename T >
173 if (t1 == t2)
return false;
174 else if (t1 == 0)
return (std::abs(t2) > 1e-5);
175 else return (std::abs(t2 - t1) / t1 > 1e-5);
183 template <
typename T >
185 bool operator()(
const T* t1,
const T* t2) {
return (t1 != t2); }
bool Memcmp(const void *const in_, const void *const out_, unsigned long size)
Cross-platform replacement for memcmp.
bool hasUniqueElts(std::vector< T > const &x)
void _atexit_()
Used for debug purpose.
typename std::enable_if< !std::is_same< T1, T2 >::value, int >::type forbidden_type
Forbidden_type<T1,T2> return the "int" type if T1 and T2 are of the same type, else nothing.
gum is the global namespace for all aGrUM entities
std::ostream & operator<<(std::ostream &os, const std::tuple<> &)
bool operator()(const T *t1, const T *t2)
Indicate whether two elements are (almost) different or not.
bool operator()(const T &t1, const T &t2)
Template implementation for utilities for aGrUM.
Contains useful methods for random stuff.
Utilities for manipulating strings.