37template <
template <
class>
class Container,
typename T>
40 cout <<
"Probando con contenedor tipo lista" <<
endl;
43 cout <<
"append de R values\n";
44 for (
int i = 0; i < n; ++i)
48 cout <<
"append de L values\n";
49 for (
int i = 0; i < n; ++i)
56 cout <<
"insert de R values\n";
57 for (
int i = 0; i < n; ++i)
61 cout <<
"insert de L values\n";
62 for (
int i = 0; i < n; ++i)
70 cout << it.get_curr() <<
" ";
74template <
template <
class,
class>
class Tree,
typename T>
77 cout <<
"Probando con contenedor tipo arbol" <<
endl;
80 cout <<
"insert de R values\n";
81 for (
int i = 0; i < n; ++i)
85 cout <<
"insert de L values (no debe insertar en arbol)\n";
86 for (
int i = 0; i < n; ++i)
93 cout <<
"insert_dup de R values\n";
94 for (
int i = 0; i < n; ++i)
98 cout <<
"insert_dup de L values\n";
99 for (
int i = 0; i < n; ++i)
103 l.
for_each([] (
const T & key) { cout << key <<
" "; });
113 for (
int i = 0; i < n; ++i)
118 Tree tree = (*create)(n);
126 try { n = std::stoi(
argv[1]); }
127 catch (...) { n = 1000; }
T & insert(const T &item)
T & append(const T &item)
Dynamic set backed by balanced binary search trees with automatic memory management.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
QuadTree - Hierarchical spatial index for 2D points.
Point * insert(Node *&r, const Point &p)
Recursive insert helper.
Singly linked list implementations with head-tail access.
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.
std::decay_t< typename HeadC::Item_Type > T
@ Tree
Basic arc (in spanning tree).
void test_container(int n)
void test_map_tree(int n)
Stack implementations backed by dynamic or fixed arrays.
Dynamic doubly linked list implementation.
Dynamic key-value map based on balanced binary search trees.
Dynamic set implementations based on balanced binary search trees.