File utils.hh¶
Defines
-
PRINT_VERBOSE_LVL(lvl, title, x)¶
macro for debug outputs
-
PRINT_VERBOSE_LVL_LN(lvl, title, x)¶
-
DEBUG_PRINT(x)¶
-
DEBUG_PRINT_LN(x)¶
-
DEBUG_VM_HIGH_PRINT(x)¶
-
DEBUG_VM_HIGH_PRINT_LN(x)¶
-
DEBUG_VM_LOW_PRINT(x)¶
-
DEBUG_VM_LOW_PRINT_LN(x)¶
-
WARN_PRINT(x)¶
-
namespace mata
Main namespace including structs and algorithms for all automata.
In particular, this includes:
Alphabets,
Formula graphs and nodes,
Closed sets.
-
class BoolVector : public std::vector<uint8_t>
- #include <utils.hh>
Representation of bool vector by a vector of uint8_t.
Public Functions
-
inline BoolVector(size_t size, bool value)¶
-
BoolVector(const BoolVector&) = default¶
-
BoolVector(BoolVector&&) noexcept = default¶
-
BoolVector() = default¶
-
BoolVector &operator=(const BoolVector&) = default¶
-
BoolVector &operator=(BoolVector&&) noexcept = default¶
-
inline size_t count() const
Count the number of set elements.
Public Static Functions
-
template<typename T>
static inline T *get_elements(T *element_set, const BoolVector &bool_vec)¶
-
inline BoolVector(size_t size, bool value)¶
-
namespace utils
SparseSet.h Implements a class template of a sparse set of unsigned integers.
Non-automata-related structures and algorithms.
In particular, this includes:
Predicates,
Ordered Vectors,
Iterators,
Printers,
Other helper functions.
- Author
Sam Griffiths www.computist.xyz https://gist.github.com/sjgriffiths/06732c6076b9db8a7cf4dfe3a7aed43a
Functions
-
inline std::string replace_all(const std::string &input, const std::string &needle, const std::string &replace)¶
Replace all occurrences of a substring in a string.
- Parameters:
input – The input string
needle – The substring to be replaced
replace – The replacement string
- Returns:
A new string with all occurrences of the substring replaced.
-
template<class T>
bool are_disjoint(const std::set<T> &lhs, const std::set<T> &rhs)¶ Are two sets disjoint?
-
template<class T, class Cont>
bool is_in(const T &elem, const Cont &cont)¶ Is there an element in a container?
-
template<class T>
inline size_t hash_combine(size_t lhs, const T &rhs)¶ 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
-
template<typename It>
size_t 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
-
template<class T, class K>
inline bool haskey(const T &cont, const K &key)¶ checks whether a container with
findcontains a key
-
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)
-
template<class Vector>
inline void reserve_on_insert(Vector &vec, size_t needed_capacity = 0, size_t extension = 32)¶
-
template<class Tuple, size_t N>
struct TuplePrinter¶ - #include <utils.hh>
-
namespace std