38#include <gtest/gtest.h>
57 buf.reserve(s.size() + 1);
73 const string input =
"hello world\nthis\tis a test\n";
93 const string input =
"A";
110 const string input =
"a b\nc\tdd\n";
123 istringstream
in(
out.str());
140 const string input =
"aba";
163 const string alphabet =
"abcde fghij\n\t";
170 input.reserve(
static_cast<size_t>(len));
171 for (
int i = 0; i < len; ++i)
199 encoder.set_end_of_stream(
"END");
Huffman coding for data compression.
Node for binary search tree.
Contiguous array of bits.
constexpr size_t size() const noexcept
Returns the dimension of the bit array.
T & insert(const T &item)
Insert a new item by copy.
size_t size() const noexcept
Count the number of elements of the list.
iterator end() noexcept
Return an STL-compatible end iterator.
__gmp_expr< T, __gmp_binary_expr< __gmp_expr< T, U >, unsigned long int, __gmp_root_function > > root(const __gmp_expr< T, U > &expr, unsigned long int l)
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
Main namespace for Aleph-w library functions.
bool areEquivalents(Node *t1, Node *t2, Equal &op) noexcept
Return true if trees are equivalents.
DynList< T > maps(const C &c, Op op)
Classic map operation.
static StlIterator begin(SetType &s)
Create an iterator positioned at the first element of the container.
static StlIterator end(SetType &s)
Create an end iterator for the container.
Utility functions for binary tree operations.