5.14. util.hpp

Full path: graph_canon/util.hpp

class always_true

A function object always returning true.

template<typename ...T>
bool operator()(T&&... args) const
Returns

true

class always_false

A function object always returning false.

template<typename ...T>
bool operator()(T&&... args) const
Returns

false

template<typename Iter>
class range : std::pair<Iter, Iter>

A class for adapting a pair of iterators into a range, e.g., useful when using Boost.Graph. See as_range.

template<typename Iter>
range<Iter> as_range(const std::pair<Iter, Iter> &x)
returns

range<Iter>(x)

template<typename Prop>
class property_less

A less-than comparator on a given property map, satisfying the boost::ReadablePropertyMapConcept.

property_less(Prop prop)
template<typename Key>
bool operator()(const Key &lhs, const Key &rhs) const
Returns

get(prop, lhs) < get(prop, rhs)

Prop prop
template<typename Prop>
property_less<Prop> make_property_less(Prop &&prop)
Returns

property_less<Prop>(std::forward<Prop>(prop))

template<typename Graph, typename SizeType>
void permute_graph(const Graph &g_in, Graph &g_out, const std::vector<SizeType> &permutation)

Add all vertices and edges from g_in to g_out, but where the order of vertex addition is given by the permutation. It must be a permutation of the vertex indices of g_in and is interpreted as a map from the indices in g_in to the indices they will get in g_out (offset by num_vertices(g_out) before the call).