37 namespace fast_multipole_embedder {
43 template<
typename A,
typename B>
inline void operator()(A a, B b) { }
50 template<
typename A>
inline bool operator()(A a) {
return result; }
51 template<
typename A,
typename B>
inline bool operator()(A a, B b) {
return result; }
59 template<
typename Func>
66 template<
typename A>
inline bool operator()(A a) {
return !cond_func(a); }
67 template<
typename A,
typename B>
inline void operator()(A a, B b) {
return !cond_func(a, b); }
71 template<
typename Func>
78 template<
typename CondType,
typename ThenType,
typename ElseType = do_nothing>
87 if_then_else_functor(
const CondType& c,
const ThenType& f1,
const ElseType& f2) : condFunc(c), thenFunc(f1), elseFunc(f2) { }
98 template<
typename A,
typename B>
109 template<
typename CondType,
typename ThenType,
typename ElseType>
116 template<
typename CondType,
typename ThenType>
124 template<
typename F,
typename A>
140 template<
typename F,
typename A>
148 template<
typename FuncFirst,
typename FuncSecond>
154 composition_functor(
const FuncFirst& first,
const FuncSecond& second) : firstFunc(first), secondFunc(second) {};
162 template<
typename A,
typename B>
172 template<
typename FuncFirst,
typename FuncSecond>
180 template<
typename Func>
187 template<
typename A,
typename B>
197 template<
typename Func>
212 min_max_functor(
const T* ptr, T& min_var, T& max_var) : a(ptr), min_value(min_var), max_value(max_var)
220 min_value = min<T>(min_value, a[i]);
221 max_value = max<T>(max_value, a[i]);
if_then_else_functor(const CondType &c, const ThenType &f1)
void operator()(B second)
static if_then_else_functor< CondType, ThenType, ElseType > if_then_else(const CondType &cond, const ThenType &thenFunc, const ElseType &elseFunc)
creates an if then else functor with a condition and a then and an else functor
pair_vice_versa_functor(const Func &f)
void operator()(A a, B b)
void operator()(A a, B b)
static if_then_else_functor< CondType, ThenType > if_then(const CondType &cond, const ThenType &thenFunc)
creates an if then functor with a condition and a then functor
functor for invoking a functor for a pair(u,v) and then (v,u)
static not_condition_functor< Func > not_condition(const Func &func)
creator of the negator
functor for negating a condition
pair_call_functor(F f, A a)
condition functor for returning a constant boolean value
min_max_functor(const T *ptr, T &min_var, T &max_var)
composition_functor(const FuncFirst &first, const FuncSecond &second)
Functor for composing two other functors.
Functor for conditional usage of a functor.
static composition_functor< FuncFirst, FuncSecond > func_comp(const FuncFirst &first, const FuncSecond &second)
create a functor composition of two functors
not_condition_functor(const Func &cond)
void operator()(A a, B b)
void operator()(A a, B b)
if_then_else_functor(const CondType &c, const ThenType &f1, const ElseType &f2)
Basic declarations, included by all source files.
static pair_vice_versa_functor< Func > pair_vice_versa(const Func &f)
creates a functor for invoking a functor for a pair(u,v) and then (v,u)
void operator()(A a, B b)
static pair_call_functor< F, A > pair_call(F f, A a)
creates a pair call resulting in a call f(a, *)
void operator()(uint32_t i)
bool operator()(A a, B b)
helper functor to generate a pair as parameters
generic min max functor for an array
The namespace for all OGDF objects.
the useless do nothing function