libvata2
[unstable] git snapshot
|
Classes | |
struct | TuplePrinter |
struct | TuplePrinter< Tuple, 1 > |
Functions | |
template<class T > | |
bool | are_disjoint (const std::set< T > &lhs, const std::set< T > &rhs) |
Are two sets disjoint? More... | |
template<class T > | |
size_t | hash_combine (size_t lhs, const T &rhs) |
Combine two hash values. More... | |
template<typename It > | |
size_t | hash_range (It first, It last) |
Hashes a range. More... | |
template<class T , class K > | |
bool | haskey (const T &cont, const K &key) |
checks whether a container with find contains a key More... | |
template<template< class, class, class...> class Map, class T1 , class T2 , class... Args> | |
Map< T2, T1 > | invert_map (const Map< T1, T2 > &mp) |
inverts a map (should work for std::map and std::unordered_map) More... | |
bool Vata2::util::are_disjoint | ( | const std::set< T > & | lhs, |
const std::set< T > & | rhs | ||
) |
|
inline |
Combine two hash values.
Values taken from http://www.boost.org/doc/libs/1_64_0/boost/functional/hash/hash.hpp
TODO: fix to be more suitable for 64b
Definition at line 67 of file util.hh.
Referenced by hash_range(), hash< std::pair< A, B > >::operator()(), and hash< Vata2::Nfa::Trans >::operator()().
size_t Vata2::util::hash_range | ( | It | first, |
It | last | ||
) |
Hashes a range.
Inspired by http://www.boost.org/doc/libs/1_64_0/boost/functional/hash/hash.hpp
Definition at line 82 of file util.hh.
References hash_combine().
Referenced by hash< std::set< A > >::operator()(), and hash< std::vector< A > >::operator()().
|
inline |
checks whether a container with find
contains a key
Definition at line 96 of file util.hh.
Referenced by Nfa::has_final(), and Nfa::has_initial().