AIToolbox
A library that offers tools for AI problem solving.
GenericVariableElimination.hpp File Reference

Go to the source code of this file.

Classes

class  AIToolbox::Factored::GenericVariableElimination< Factor >
 This class represents the Variable Elimination algorithm. More...
 

Namespaces

 AIToolbox
 
 AIToolbox::Factored
 

Macros

#define STR2(X)   #X
 
#define STR(X)   STR2(X)
 
#define ARG(...)   __VA_ARGS__
 
#define MEMBER_CHECK(name, retval, input)
 

Macro Definition Documentation

◆ ARG

#define ARG (   ...)    __VA_ARGS__

◆ MEMBER_CHECK

#define MEMBER_CHECK (   name,
  retval,
  input 
)
Value:
\
private: \
\
template <typename Z> static constexpr auto name##Check(char) -> decltype( \
static_cast<retval (Z::*)(input)> (&Z::name), \
bool() \
) { return true; } \
template <typename Z> static constexpr auto name##Check(int) -> decltype( \
static_cast<retval (Z::*)(input) const> (&Z::name), \
bool() \
) { return true; } \
template <typename Z> static constexpr auto name##Check(long) -> decltype( \
&Z::name, \
bool()) \
{ \
static_assert(Impl::is_compatible_f< \
decltype(&Z::name), \
retval(input) \
>::value, "You provide a member '" STR(name) "' but with the wrong signature."); \
return true; \
} \
template <typename Z> static constexpr auto name##Check(...) -> bool { return false; } \
\
public: \
enum { \
name = name##Check<M>('\0') \
};

◆ STR

#define STR (   X)    STR2(X)

◆ STR2

#define STR2 (   X)    #X
STR
#define STR(X)
Definition: GenericVariableElimination.hpp:115