Utils namespace. More...
Namespaces | |
concepts | |
Utils concepts namespace. | |
Classes | |
class | compare |
Class for comparing floating point. More... | |
struct | ignore_param |
Type that can be constructed from anything and has no other functionality. More... | |
struct | skip_functor |
Functor does nothing. More... | |
struct | return_constant_functor |
Functor returns always the same number. The number has to be known at compile time. More... | |
struct | dynamic_return_constant_functor |
Functor returns always the same number (dynamic version). More... | |
struct | identity_functor |
functor returns its argument More... | |
class | tuple_uncurry |
transforms a functor taking multiple parameters into a functor taking a tuple parameter. More... | |
struct | always_false |
functor return false More... | |
struct | always_true |
functor return true More... | |
struct | return_zero_functor |
functor returns 0 More... | |
struct | return_one_functor |
functor returns 1 More... | |
struct | assert_functor |
functors calls assert(false). More... | |
struct | remove_reference |
removes reference More... | |
class | counting_functor_adaptor |
Counts number of calls. More... | |
class | array_to_functor |
Adapts array as function, providing operator()(). More... | |
struct | assignable_functor |
Wrapper around a functor which adds assigmnent operator as well as default constructor. Note, this struct might be dangerous. Using this struct correctly requires the underlying functor to live at least as long as this wrapper. More... | |
struct | lift_iterator_functor |
For given functor f, lift_iterator_functor provides operator()(Iterator iterator) which returns f(*iter). More... | |
struct | greater |
greater functor More... | |
struct | less |
less functor More... | |
struct | greater_equal |
greater_equal functor More... | |
struct | less_equal |
less_equal functor More... | |
struct | equal_to |
equal_to functor More... | |
struct | equal_to_unspecified |
TODO equivalent to c++14 equal_to<>, remove when appears. More... | |
struct | not_equal_to |
not_equal_to functor More... | |
struct | functor_to_comparator |
struct | scale_functor |
Functor that scales another functor. More... | |
struct | plus |
plus More... | |
struct | minus |
minus More... | |
struct | max |
max More... | |
struct | min |
min More... | |
struct | Not |
Not. More... | |
struct | Or |
Or. More... | |
struct | And |
And. More... | |
struct | lift_binary_operator_functor |
struct | not_functor |
not_functor More... | |
struct | or_functor |
or_functor More... | |
struct | and_functor |
and_functor More... | |
struct | xor_functor |
xor_functor More... | |
struct | tuple_get |
functor for std::tuple::get<I> More... | |
struct | iterator_with_excluded_element |
this iterator exlcludes one specific element from range More... | |
class | property_map_get |
Functor object for property map get. This class exists because std::bind can't be used with polymorphic functions and we don't have polymorphic lambdas yet to allow perfect forwarding. More... | |
class | singleton_iterator |
Iterator to range containing single element. More... | |
struct | failure_message |
Functor prints failure message. More... | |
Functions | |
template<typename Idx , typename... GraphArgs> | |
void | contract (boost::adjacency_matrix< GraphArgs...> &amatrix, Idx v, Idx w) |
contracts to vertices in adjacency_matrix | |
template<typename T > | |
auto | make_dynamic_return_constant_functor (T t) |
make function for dynamic_return_constant_functor More... | |
template<typename F , typename G > | |
auto | compose (F f, G g) |
functor composition: x -> f(g(x)) More... | |
template<typename F , typename... Fs> | |
auto | compose (F f, Fs...fs) |
functor composition, variadic case More... | |
template<class F > | |
auto | make_tuple_uncurry (F f) |
make for tuple_uncurry More... | |
template<typename CounterType = int, typename Functor > | |
auto | make_counting_functor_adaptor (Functor f, CounterType &cnt) |
make function for counting_functor_adaptor More... | |
template<typename Array > | |
auto | make_array_to_functor (const Array &a, int offset=0) |
make function for array_to_functor More... | |
template<typename Functor > | |
auto | make_assignable_functor (Functor &f) |
make function for assignable_functor More... | |
template<typename Functor > | |
auto | make_lift_iterator_functor (Functor f) |
make function for lift_iterator_functor More... | |
template<typename Functor , typename Compare = less> | |
auto | make_functor_to_comparator (Functor functor, Compare compare=Compare()) |
make for functor to comparator More... | |
template<typename ScaleType , typename ReturnType = ScaleType, typename Functor > | |
auto | make_scale_functor (Functor f, ScaleType s) |
make for scale_functor More... | |
template<typename FunctorLeft , typename FunctorRight , typename Operator > | |
auto | make_lift_binary_operator_functor (FunctorLeft left, FunctorRight right, Operator op) |
make function for lift_binary_operator_functor More... | |
template<typename Functor > | |
auto | make_not_functor (Functor functor) |
make for Not | |
template<typename FunctorLeft , typename FunctorRight > | |
auto | make_or_functor (FunctorLeft left, FunctorRight right) |
make for or_functor | |
template<typename FunctorLeft , typename FunctorRight > | |
auto | make_and_functor (FunctorLeft left, FunctorRight right) |
make and_functor | |
template<typename FunctorLeft , typename FunctorRight > | |
auto | make_xor_functor (FunctorLeft left, FunctorRight right) |
make for Xor | |
template<class Map > | |
property_map_get< Map > | make_property_map_get (Map map) |
make for property_map_get More... | |
template<class ForwardRange > | |
auto | rotate (const ForwardRange &rng, range_to_diff_type_t< ForwardRange > n) |
returns rotated view of the given range More... | |
template<typename Elem > | |
singleton_iterator< Elem > | make_singleton_iterator_begin (Elem &&elem) |
function to create begin of singleton_iterator More... | |
template<typename Elem > | |
singleton_iterator< Elem > | make_singleton_iterator_end () |
function to create end of singleton_iterator More... | |
template<typename Elem > | |
auto | make_singleton_range (Elem &&elem) -> decltype(boost::make_iterator_range(make_singleton_iterator_begin(std::forward< Elem >(elem)), make_singleton_iterator_end< Elem >())) |
function to create a singleton range More... | |
auto | print_message (std::ostream &output_stream) |
prints message (specialization for empty message) | |
template<typename Arg , typename... Args> | |
auto | print_message (std::ostream &output_stream, Arg &&arg, Args...args) |
prints message | |
template<typename Arg , typename... Args> | |
auto | info (Arg &&arg, Args...args) |
prints info message | |
template<typename Arg , typename... Args> | |
auto | warning (Arg &&arg, Args...args) |
prints warning message | |
template<typename Arg , typename... Args> | |
auto | failure (Arg &&arg, Args...args) |
prints failure message | |
Utils namespace.
auto paal::utils::compose | ( | F | f, |
G | g | ||
) |
functor composition: x -> f(g(x))
F | |
G |
f | |
g |
Definition at line 153 of file functors.hpp.
auto paal::utils::compose | ( | F | f, |
Fs... | fs | ||
) |
functor composition, variadic case
F | |
Fs |
f | |
fs |
Definition at line 168 of file functors.hpp.
auto paal::utils::make_array_to_functor | ( | const Array & | a, |
int | offset = 0 |
||
) |
make function for array_to_functor
Array |
a | |
offset |
Definition at line 364 of file functors.hpp.
auto paal::utils::make_assignable_functor | ( | Functor & | f | ) |
make function for assignable_functor
Functor |
f |
Definition at line 421 of file functors.hpp.
auto paal::utils::make_counting_functor_adaptor | ( | Functor | f, |
CounterType & | cnt | ||
) |
make function for counting_functor_adaptor
CounterType | |
Functor |
f | |
cnt |
Definition at line 317 of file functors.hpp.
auto paal::utils::make_dynamic_return_constant_functor | ( | T | t | ) |
make function for dynamic_return_constant_functor
T |
t |
Definition at line 121 of file functors.hpp.
auto paal::utils::make_functor_to_comparator | ( | Functor | functor, |
Compare | compare = Compare() |
||
) |
make for functor to comparator
Functor | |
Compare |
functor | |
compare |
Definition at line 654 of file functors.hpp.
auto paal::utils::make_lift_binary_operator_functor | ( | FunctorLeft | left, |
FunctorRight | right, | ||
Operator | op | ||
) |
make function for lift_binary_operator_functor
FunctorLeft | |
FunctorRight | |
Operator |
left | |
right | |
op |
Definition at line 884 of file functors.hpp.
auto paal::utils::make_lift_iterator_functor | ( | Functor | f | ) |
make function for lift_iterator_functor
Functor |
f |
Definition at line 467 of file functors.hpp.
property_map_get<Map> paal::utils::make_property_map_get | ( | Map | map | ) |
make for property_map_get
Map |
map |
Definition at line 72 of file property_map.hpp.
auto paal::utils::make_scale_functor | ( | Functor | f, |
ScaleType | s | ||
) |
make for scale_functor
ScaleType | |
ReturnType | |
Functor |
f | |
s |
Definition at line 702 of file functors.hpp.
singleton_iterator<Elem> paal::utils::make_singleton_iterator_begin | ( | Elem && | elem | ) |
function to create begin of singleton_iterator
Elem |
elem |
Definition at line 77 of file singleton_iterator.hpp.
singleton_iterator<Elem> paal::utils::make_singleton_iterator_end | ( | ) |
function to create end of singleton_iterator
Elem |
Definition at line 89 of file singleton_iterator.hpp.
auto paal::utils::make_singleton_range | ( | Elem && | elem | ) | -> decltype(boost::make_iterator_range( make_singleton_iterator_begin(std::forward<Elem>(elem)), make_singleton_iterator_end<Elem>() )) |
function to create a singleton range
Elem |
elem |
Definition at line 102 of file singleton_iterator.hpp.
auto paal::utils::make_tuple_uncurry | ( | F | f | ) |
make for tuple_uncurry
F |
f |
Definition at line 217 of file functors.hpp.
auto paal::utils::rotate | ( | const ForwardRange & | rng, |
range_to_diff_type_t< ForwardRange > | n | ||
) |
returns rotated view of the given range
ForwardRange |
rng | |
n |
Definition at line 38 of file rotate.hpp.