38#include <gtest/gtest.h>
46using namespace testing;
52 static inline int move_count = 0;
55 Movable() : value(0) {}
56 Movable(
int v) : value(v) {}
57 Movable(
const Movable &) =
default;
58 Movable & operator=(
const Movable &) =
default;
66 Movable & operator=(Movable &&
other)
noexcept
100 Movable::move_count = 0;
121 for (
int i = 0; i < 5; ++i)
124 std::vector<int>
got;
135 for (
int i = 0; i < 4; ++i)
149 for (
int i = 0; i < 5; ++i)
154 for (
size_t i = 0; i < b.
size(); ++i)
167 for (
int i = 0; i < 3; ++i)
189 for (
int i = 0; i < 4; ++i)
211 for (
int i = 0; i < 3; ++i)
228 Movable::move_count = 0;
244 std::mt19937
rng(123456);
245 std::uniform_int_distribution<int>
op_dist(0, 1);
246 std::uniform_int_distribution<int>
val_dist(-100, 100);
254 std::uniform_int_distribution<int>
pos_dist(0,
static_cast<int>(
oracle.size()));
267 std::uniform_int_distribution<int>
pos_dist(0,
static_cast<int>(
oracle.size() - 1));
275 for (
size_t i = 0; i <
oracle.size(); ++i)
Iterator specialized for DynSlist returning payload references.
T & get_curr()
Return a reference to the current payload.
Dynamic list of elements of type T implemented with a singly linked list of nodes.
size_t size() const noexcept
Return the number of stored elements.
void remove(const int pos)
Remove the node at position pos.
void insert(const int pos, const T &data)
Insert an element at position pos.
void next()
Advance the iterator to the next node.
bool has_curr() const noexcept
Return true if the iterator currently points to a node.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
FooMap m(5, fst_unit_pair_hash, snd_unit_pair_hash)
Dynamic singly linked list.