All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Namespaces | Classes | Functions
paal::utils Namespace Reference

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
 

Detailed Description

Utils namespace.

Function Documentation

template<typename F , typename G >
auto paal::utils::compose ( F  f,
g 
)

functor composition: x -> f(g(x))

Template Parameters
F
G
Parameters
f
g
Returns

Definition at line 153 of file functors.hpp.

template<typename F , typename... Fs>
auto paal::utils::compose ( F  f,
Fs...  fs 
)

functor composition, variadic case

Template Parameters
F
Fs
Parameters
f
fs
Returns

Definition at line 168 of file functors.hpp.

template<typename Array >
auto paal::utils::make_array_to_functor ( const Array &  a,
int  offset = 0 
)

make function for array_to_functor

Template Parameters
Array
Parameters
a
offset
Returns

Definition at line 364 of file functors.hpp.

template<typename Functor >
auto paal::utils::make_assignable_functor ( Functor &  f)

make function for assignable_functor

Template Parameters
Functor
Parameters
f
Returns

Definition at line 421 of file functors.hpp.

template<typename CounterType = int, typename Functor >
auto paal::utils::make_counting_functor_adaptor ( Functor  f,
CounterType &  cnt 
)

make function for counting_functor_adaptor

Template Parameters
CounterType
Functor
Parameters
f
cnt
Returns

Definition at line 317 of file functors.hpp.

template<typename T >
auto paal::utils::make_dynamic_return_constant_functor ( t)

make function for dynamic_return_constant_functor

Template Parameters
T
Parameters
t
Returns

Definition at line 121 of file functors.hpp.

template<typename Functor , typename Compare = less>
auto paal::utils::make_functor_to_comparator ( Functor  functor,
Compare  compare = Compare() 
)

make for functor to comparator

Template Parameters
Functor
Compare
Parameters
functor
compare
Returns

Definition at line 654 of file functors.hpp.

template<typename FunctorLeft , typename FunctorRight , typename Operator >
auto paal::utils::make_lift_binary_operator_functor ( FunctorLeft  left,
FunctorRight  right,
Operator  op 
)

make function for lift_binary_operator_functor

Template Parameters
FunctorLeft
FunctorRight
Operator
Parameters
left
right
op
Returns

Definition at line 884 of file functors.hpp.

template<typename Functor >
auto paal::utils::make_lift_iterator_functor ( Functor  f)

make function for lift_iterator_functor

Template Parameters
Functor
Parameters
f
Returns

Definition at line 467 of file functors.hpp.

template<class Map >
property_map_get<Map> paal::utils::make_property_map_get ( Map  map)

make for property_map_get

Template Parameters
Map
Parameters
map
Returns

Definition at line 72 of file property_map.hpp.

template<typename ScaleType , typename ReturnType = ScaleType, typename Functor >
auto paal::utils::make_scale_functor ( Functor  f,
ScaleType  s 
)

make for scale_functor

Template Parameters
ScaleType
ReturnType
Functor
Parameters
f
s
Returns

Definition at line 702 of file functors.hpp.

template<typename Elem >
singleton_iterator<Elem> paal::utils::make_singleton_iterator_begin ( Elem &&  elem)

function to create begin of singleton_iterator

Template Parameters
Elem
Parameters
elem
Returns

Definition at line 77 of file singleton_iterator.hpp.

template<typename Elem >
singleton_iterator<Elem> paal::utils::make_singleton_iterator_end ( )

function to create end of singleton_iterator

Template Parameters
Elem
Returns

Definition at line 89 of file singleton_iterator.hpp.

template<typename Elem >
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

Template Parameters
Elem
Parameters
elem
Returns

Definition at line 102 of file singleton_iterator.hpp.

template<class F >
auto paal::utils::make_tuple_uncurry ( F  f)

make for tuple_uncurry

Template Parameters
F
Parameters
f
Returns

Definition at line 217 of file functors.hpp.

template<class ForwardRange >
auto paal::utils::rotate ( const ForwardRange &  rng,
range_to_diff_type_t< ForwardRange >  n 
)

returns rotated view of the given range

Template Parameters
ForwardRange
Parameters
rng
n
Returns

Definition at line 38 of file rotate.hpp.