Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ah-convert.H
Go to the documentation of this file.
1
2/*
3 Aleph_w
4
5 Data structures & Algorithms
6 version 2.0.0b
7 https://github.com/lrleon/Aleph-w
8
9 This file is part of Aleph-w library
10
11 Copyright (c) 2002-2026 Leandro Rabindranath Leon
12
13 Permission is hereby granted, free of charge, to any person obtaining a copy
14 of this software and associated documentation files (the "Software"), to deal
15 in the Software without restriction, including without limitation the rights
16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 copies of the Software, and to permit persons to whom the Software is
18 furnished to do so, subject to the following conditions:
19
20 The above copyright notice and this permission notice shall be included in all
21 copies or substantial portions of the Software.
22
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 SOFTWARE.
30*/
31
32
116#ifndef AH_CONVERT_H
117#define AH_CONVERT_H
118
119#include <deque>
120#include <initializer_list>
121#include <set>
122#include <map>
123#include <utility>
124#include <tpl_array.H>
125#include <tpl_dynArray.H>
126#include <tpl_dynDlist.H>
127#include <tpl_dynSetTree.H>
128#include <tpl_dynSetHash.H>
129#include <tpl_dynMapTree.H>
130#include <tpl_dynMapOhash.H>
131
132namespace Aleph
133{
134
146template <class T>
148{
149 return a.template maps<T>([] (const auto & item) { return item; });
150}
151
166template <class C>
169{
171 for (auto it = c.get_it(); it.has_curr(); it.next_ne())
172 ret.append(it.get_curr());
173 return ret;
174}
175
179template <class C>
181{
182 return to_Array(c);
183}
184
196template <class T>
198{
200 for (size_t i = 0; i < a.size(); ++i)
201 ret.append(a(i));
202 return ret;
203}
204
216template <class T>
218{
220 for (auto it = l.get_it(); it.has_curr(); it.next_ne())
221 ret.append(it.get_curr());
222 return ret;
223}
224
237template <class C>
238[[nodiscard]] std::vector<typename C::Item_Type> to_vector(const C & c)
239{
240 std::vector<typename C::Item_Type> ret;
241 if constexpr (requires { c.size(); })
242 ret.reserve(c.size());
243 for (auto it = c.get_it(); it.has_curr(); it.next_ne())
244 ret.push_back(it.get_curr());
245 return ret;
246}
247
259template <class T>
260[[nodiscard]] DynList<T> vector_to_DynList(const std::vector<T> & v)
261{
263 for (const auto & item : v)
264 ret.append(item);
265 return ret;
266}
267
279template <class T>
280[[nodiscard]] Array<T> vector_to_Array(const std::vector<T> & v)
281{
283 ret.reserve(v.size());
284 for (const auto & item : v)
285 ret.append(item);
286 return ret;
287}
288
300template <class T>
301[[nodiscard]] DynArray<T> vector_to_DynArray(const std::vector<T> & v)
302{
304 for (const auto & item : v)
305 ret.append(item);
306 return ret;
307}
308
322template <class C>
324{
326 for (auto it = c.get_it(); it.has_curr(); it.next_ne())
327 ret.append(it.get_curr());
328 return ret;
329}
330
342template <class T>
344{
346 for (size_t i = 0; i < a.size(); ++i)
347 ret.append(a(i));
348 return ret;
349}
350
362template <class T>
364{
366 for (size_t i = 0; i < a.size(); ++i)
367 ret.append(a(i));
368 return ret;
369}
370
383template <class C>
384[[nodiscard]] std::deque<typename C::Item_Type> to_deque(const C & c)
385{
386 std::deque<typename C::Item_Type> ret;
387 for (auto it = c.get_it(); it.has_curr(); it.next_ne())
388 ret.push_back(it.get_curr());
389 return ret;
390}
391
403template <class T>
404[[nodiscard]] DynList<T> deque_to_DynList(const std::deque<T> & d)
405{
407 for (const auto & item : d)
408 ret.append(item);
409 return ret;
410}
411
423template <class T>
424[[nodiscard]] Array<T> deque_to_Array(const std::deque<T> & d)
425{
427 ret.reserve(d.size());
428 for (const auto & item : d)
429 ret.append(item);
430 return ret;
431}
432
444template <class T>
445[[nodiscard]] DynArray<T> deque_to_DynArray(const std::deque<T> & d)
446{
448 for (const auto & item : d)
449 ret.append(item);
450 return ret;
451}
452
453// ==================== DynDlist Conversions ====================
454
466template <class T>
468{
470 l.for_each([&ret](const T & item) { ret.append(item); });
471 return ret;
472}
473
485template <class T>
487{
489 l.for_each([&ret](const T & item) { ret.append(item); });
490 return ret;
491}
492
504template <class T>
506{
508 l.for_each([&ret](const T & item) { ret.append(item); });
509 return ret;
510}
511
523template <class T>
525{
527 for (size_t i = 0; i < a.size(); ++i)
528 ret.append(a(i));
529 return ret;
530}
531
543template <class T>
544[[nodiscard]] DynDlist<T> vector_to_DynDlist(const std::vector<T> & v)
545{
547 for (const auto & item : v)
548 ret.append(item);
549 return ret;
550}
551
552// ==================== Move Semantics Conversions ====================
553
566template <class T>
567[[nodiscard]] DynList<T> vector_to_DynList(std::vector<T> && v)
568{
570 for (auto & item : v)
571 ret.append(std::move(item));
572 return ret;
573}
574
587template <class T>
588[[nodiscard]] Array<T> vector_to_Array(std::vector<T> && v)
589{
591 for (auto & item : v)
592 ret.append(std::move(item));
593 return ret;
594}
595
608template <class T>
610{
612 for (auto & item : v)
613 ret.append(std::move(item));
614 return ret;
615}
616
629template <class T>
631{
633 for (auto & item : v)
634 ret.append(std::move(item));
635 return ret;
636}
637
638// ==================== std::set Conversions ====================
639
653template <class T, class Compare, class Alloc>
654[[nodiscard]] DynList<T> set_to_DynList(const std::set<T, Compare, Alloc> & s)
655{
657 for (const auto & item : s)
658 ret.append(item);
659 return ret;
660}
661
675template <class T, class Compare, class Alloc>
676[[nodiscard]] Array<T> set_to_Array(const std::set<T, Compare, Alloc> & s)
677{
679 ret.reserve(s.size());
680 for (const auto & item : s)
681 ret.append(item);
682 return ret;
683}
684
698template <class T, class Compare, class Alloc>
699[[nodiscard]] DynArray<T> set_to_DynArray(const std::set<T, Compare, Alloc> & s)
700{
702 for (const auto & item : s)
703 ret.append(item);
704 return ret;
705}
706
718template <class C>
719[[nodiscard]] std::set<typename C::Item_Type> to_set(const C & c)
720{
721 std::set<typename C::Item_Type> ret;
722 for (auto it = c.get_it(); it.has_curr(); it.next_ne())
723 ret.insert(it.get_curr());
724 return ret;
725}
726
727// ==================== std::map Conversions ====================
728
743template <class K, class V, class Compare, class Alloc>
745map_to_DynList(const std::map<K, V, Compare, Alloc> & m)
746{
748 for (const auto & [key, value] : m)
749 ret.append(std::make_pair(key, value));
750 return ret;
751}
752
767template <class K, class V, class Compare, class Alloc>
769map_to_Array(const std::map<K, V, Compare, Alloc> & m)
770{
772 ret.reserve(m.size());
773 for (const auto & [key, value] : m)
774 ret.append(std::make_pair(key, value));
775 return ret;
776}
777
792template <class K, class V, class Compare, class Alloc>
793[[nodiscard]] DynList<K> map_keys_to_DynList(const std::map<K, V, Compare, Alloc> & m)
794{
796 for (const auto & [key, value] : m)
797 ret.append(key);
798 return ret;
799}
800
815template <class K, class V, class Compare, class Alloc>
816[[nodiscard]] DynList<V> map_values_to_DynList(const std::map<K, V, Compare, Alloc> & m)
817{
819 for (const auto & [key, value] : m)
820 ret.append(value);
821 return ret;
822}
823
824// ==================== initializer_list Conversions ====================
825
842template <class T>
843[[nodiscard]] DynList<T> init_to_DynList(std::initializer_list<T> il)
844{
846 for (const auto & item : il)
847 ret.append(item);
848 return ret;
849}
850
867template <class T>
868[[nodiscard]] Array<T> init_to_Array(std::initializer_list<T> il)
869{
871 for (const auto & item : il)
872 ret.append(item);
873 return ret;
874}
875
892template <class T>
893[[nodiscard]] DynArray<T> init_to_DynArray(std::initializer_list<T> il)
894{
896 for (const auto & item : il)
897 ret.append(item);
898 return ret;
899}
900
917template <class T>
918[[nodiscard]] DynDlist<T> init_to_DynDlist(std::initializer_list<T> il)
919{
921 for (const auto & item : il)
922 ret.append(item);
923 return ret;
924}
925
926// ==================== DynSetTree Conversions ====================
927
941template <typename Key, template <typename, class> class Tree, class Compare>
943{
945 s.for_each([&ret](const Key & item) { ret.append(item); });
946 return ret;
947}
948
962template <typename Key, template <typename, class> class Tree, class Compare>
964{
966 ret.reserve(s.size());
967 s.for_each([&ret](const Key & item) { ret.append(item); });
968 return ret;
969}
970
984template <typename Key, template <typename, class> class Tree, class Compare>
986{
988 s.for_each([&ret](const Key & item) { ret.append(item); });
989 return ret;
990}
991
1002template <typename Key, template <typename, class> class Tree, class Compare>
1004{
1005 std::vector<Key> ret;
1006 ret.reserve(s.size());
1007 s.for_each([&ret](const Key & item) { ret.push_back(item); });
1008 return ret;
1009}
1010
1021template <typename Key, template <typename, class> class Tree, class Compare>
1023{
1024 std::set<Key> ret;
1025 s.for_each([&ret](const Key & item) { ret.insert(item); });
1026 return ret;
1027}
1028
1040template <class C>
1042{
1044 for (auto it = c.get_it(); it.has_curr(); it.next_ne())
1045 ret.insert(it.get_curr());
1046 return ret;
1047}
1048
1057template <class T>
1058[[nodiscard]] DynSetTree<T> vector_to_DynSetTree(const std::vector<T> & v)
1059{
1061 for (const auto & item : v)
1062 ret.insert(item);
1063 return ret;
1064}
1065
1066// ==================== DynSetHash Conversions ====================
1067
1078template <typename Key, template <typename, class> class HashTable, class Cmp>
1080{
1082 s.for_each([&ret](const Key & item) { ret.append(item); });
1083 return ret;
1084}
1085
1096template <typename Key, template <typename, class> class HashTable, class Cmp>
1098{
1100 ret.reserve(s.size());
1101 s.for_each([&ret](const Key & item) { ret.append(item); });
1102 return ret;
1103}
1104
1115template <typename Key, template <typename, class> class HashTable, class Cmp>
1117{
1119 s.for_each([&ret](const Key & item) { ret.append(item); });
1120 return ret;
1121}
1122
1133template <typename Key, template <typename, class> class HashTable, class Cmp>
1135{
1136 std::vector<Key> ret;
1137 ret.reserve(s.size());
1138 s.for_each([&ret](const Key & item) { ret.push_back(item); });
1139 return ret;
1140}
1141
1142// ==================== DynMapTree Conversions ====================
1143
1158template <typename Key, typename Data,
1159 template <typename, class> class Tree, class Compare>
1162{
1164 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p); });
1165 return ret;
1166}
1167
1179template <typename Key, typename Data,
1180 template <typename, class> class Tree, class Compare>
1183{
1185 ret.reserve(m.size());
1186 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p); });
1187 return ret;
1188}
1189
1201template <typename Key, typename Data,
1202 template <typename, class> class Tree, class Compare>
1203[[nodiscard]] std::map<Key, Data>
1205{
1206 std::map<Key, Data> ret;
1207 m.for_each([&ret](const std::pair<Key, Data> & p) {
1208 ret.emplace(p.first, p.second);
1209 });
1210 return ret;
1211}
1212
1224template <typename Key, typename Data,
1225 template <typename, class> class Tree, class Compare>
1228{
1230 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p.first); });
1231 return ret;
1232}
1233
1245template <typename Key, typename Data,
1246 template <typename, class> class Tree, class Compare>
1249{
1251 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p.second); });
1252 return ret;
1253}
1254
1266template <class K, class V, class Compare, class Alloc>
1268stdmap_to_DynMapTree(const std::map<K, V, Compare, Alloc> & m)
1269{
1271 for (const auto & [key, value] : m)
1272 ret.insert(key, value);
1273 return ret;
1274}
1275
1276// ==================== MapOpenHash Conversions ====================
1277
1289template <typename Key, typename Data, class Cmp,
1290 template <typename, class> class HashTable>
1293{
1295 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p); });
1296 return ret;
1297}
1298
1310template <typename Key, typename Data, class Cmp,
1311 template <typename, class> class HashTable>
1314{
1316 ret.reserve(m.size());
1317 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p); });
1318 return ret;
1319}
1320
1332template <typename Key, typename Data, class Cmp,
1333 template <typename, class> class HashTable>
1334[[nodiscard]] std::map<Key, Data>
1336{
1337 std::map<Key, Data> ret;
1338 m.for_each([&ret](const std::pair<Key, Data> & p) {
1339 ret.emplace(p.first, p.second);
1340 });
1341 return ret;
1342}
1343
1355template <typename Key, typename Data, class Cmp,
1356 template <typename, class> class HashTable>
1359{
1361 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p.first); });
1362 return ret;
1363}
1364
1376template <typename Key, typename Data, class Cmp,
1377 template <typename, class> class HashTable>
1380{
1382 m.for_each([&ret](const std::pair<Key, Data> & p) { ret.append(p.second); });
1383 return ret;
1384}
1385
1386} // end namespace Aleph
1387
1388#endif // AH_CONVERT_H
Simple dynamic array with automatic resizing and functional operations.
Definition tpl_array.H:139
constexpr size_t size() const noexcept
Return the number of elements stored in the stack.
Definition tpl_array.H:351
T & append(const T &data)
Append a copy of data
Definition tpl_array.H:245
void reserve(size_t cap)
Reserves cap cells into the array.
Definition tpl_array.H:315
size_t size() const noexcept
Return the current dimension of array.
T & append()
Allocate a new entry to the end of array.
Dynamic doubly linked list with O(1) size and bidirectional access.
T & append(const T &item)
Append a copied item at the end of the list.
Self-adjusting dynamic hash table.
Dynamic singly linked list with functional programming support.
Definition htlist.H:1155
T & append(const T &item)
Definition htlist.H:1271
Generic key-value map implemented on top of a binary search tree.
Pair * insert(const Key &key, const Data &data)
Insert a key-value pair.
Dynamic set backed by balanced binary search trees with automatic memory management.
const size_t & size() const
Returns the cardinality of the set.
Key * insert(const Key &key)
Inserts a key into the dynamic set.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
Definition ah-dry.H:779
auto get_it() const
Return a properly initialized iterator positioned at the first item on the container.
Definition ah-dry.H:222
constexpr size_t size() const noexcept
Returns the number of entries in the table.
Definition hashDry.H:619
Concept that identifies types that can be converted or used as an Aleph Array.
Main namespace for Aleph-w library functions.
Definition ah-arena.H:89
Array< typename C::Item_Type > to_array(const C &c)
Convenience wrapper identical to to_Array (copy contents).
Definition ah-convert.H:180
DynSetTree< T > vector_to_DynSetTree(const std::vector< T > &v)
Convert a std::vector to a DynSetTree.
std::set< Key > settree_to_stdset(const DynSetTree< Key, Tree, Compare > &s)
Convert a DynSetTree to a std::set.
DynList< T > to_DynList(const Array< T > &a)
Convert an Array to a DynList.
Definition ah-convert.H:147
DynList< K > map_keys_to_DynList(const std::map< K, V, Compare, Alloc > &m)
Extract keys from a std::map to a DynList.
Definition ah-convert.H:793
DynList< V > map_values_to_DynList(const std::map< K, V, Compare, Alloc > &m)
Extract values from a std::map to a DynList.
Definition ah-convert.H:816
DynList< std::pair< K, V > > map_to_DynList(const std::map< K, V, Compare, Alloc > &m)
Convert a std::map to a DynList of pairs.
Definition ah-convert.H:745
DynList< T > dyndlist_to_DynList(const DynDlist< T > &l)
Convert a DynDlist to a DynList.
Definition ah-convert.H:467
DynList< T > dynarray_to_DynList(const DynArray< T > &a)
Convert a DynArray to a DynList.
Definition ah-convert.H:197
DynList< Key > maptree_keys_to_DynList(const DynMapTree< Key, Data, Tree, Compare > &m)
Extract keys from a DynMapTree to a DynList.
DynArray< T > dyndlist_to_DynArray(const DynDlist< T > &l)
Convert a DynDlist to a DynArray.
Definition ah-convert.H:505
Array< std::pair< Key, Data > > maphash_to_Array(const MapOpenHash< Key, Data, Cmp, HashTable > &m)
Convert a MapOpenHash to an Array of pairs.
DynList< std::pair< Key, Data > > maphash_to_DynList(const MapOpenHash< Key, Data, Cmp, HashTable > &m)
Convert a MapOpenHash to a DynList of pairs.
Array< std::pair< Key, Data > > maptree_to_Array(const DynMapTree< Key, Data, Tree, Compare > &m)
Convert a DynMapTree to an Array of pairs.
DynDlist< T > vector_to_DynDlist(const std::vector< T > &v)
Convert a std::vector to a DynDlist.
Definition ah-convert.H:544
Array< T > deque_to_Array(const std::deque< T > &d)
Convert a std::deque to an Array.
Definition ah-convert.H:424
Array< T > init_to_Array(std::initializer_list< T > il)
Convert an initializer_list to an Array.
Definition ah-convert.H:868
std::vector< Key > sethash_to_vector(const DynHashTable< Key, HashTable, Cmp > &s)
Convert a DynHashTable (hash set) to a std::vector.
DynList< std::pair< Key, Data > > maptree_to_DynList(const DynMapTree< Key, Data, Tree, Compare > &m)
Convert a DynMapTree to a DynList of pairs.
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
Definition ah-zip.H:105
Array< T > dynarray_to_Array(const DynArray< T > &a)
Convert a DynArray to an Array.
Definition ah-convert.H:363
DynList< Data > maptree_values_to_DynList(const DynMapTree< Key, Data, Tree, Compare > &m)
Extract values from a DynMapTree to a DynList.
DynArray< Key > settree_to_DynArray(const DynSetTree< Key, Tree, Compare > &s)
Convert a DynSetTree to a DynArray.
Definition ah-convert.H:985
std::map< Key, Data > maphash_to_stdmap(const MapOpenHash< Key, Data, Cmp, HashTable > &m)
Convert a MapOpenHash to a std::map.
Array< T > set_to_Array(const std::set< T, Compare, Alloc > &s)
Convert a std::set to an Array.
Definition ah-convert.H:676
DynList< T > vector_to_DynList(const std::vector< T > &v)
Convert a std::vector to a DynList.
Definition ah-convert.H:260
DynArray< T > dynlist_to_DynArray(const DynList< T > &l)
Convert a DynList to a DynArray.
Definition ah-convert.H:217
DynArray< T > array_to_DynArray(const Array< T > &a)
Convert an Array to a DynArray.
Definition ah-convert.H:343
DynSetTree< typename C::Item_Type > to_DynSetTree(const C &c)
Convert a container to a DynSetTree (AVL by default).
@ Tree
Basic arc (in spanning tree).
DynArray< T > deque_to_DynArray(const std::deque< T > &d)
Convert a std::deque to a DynArray.
Definition ah-convert.H:445
std::vector< Key > settree_to_vector(const DynSetTree< Key, Tree, Compare > &s)
Convert a DynSetTree to a std::vector.
std::set< typename C::Item_Type > to_set(const C &c)
Convert a container to a std::set.
Definition ah-convert.H:719
Array< T > vector_to_Array(const std::vector< T > &v)
Convert a std::vector to an Array.
Definition ah-convert.H:280
DynList< Key > sethash_to_DynList(const DynHashTable< Key, HashTable, Cmp > &s)
Convert a DynHashTable (hash set) to a DynList.
DynDlist< T > dynlist_to_DynDlist(const DynList< T > &l)
Convert a DynList to a DynDlist.
Definition ah-convert.H:486
Array< Key > sethash_to_Array(const DynHashTable< Key, HashTable, Cmp > &s)
Convert a DynHashTable (hash set) to an Array.
DynDlist< T > init_to_DynDlist(std::initializer_list< T > il)
Convert an initializer_list to a DynDlist.
Definition ah-convert.H:918
DynList< Data > maphash_values_to_DynList(const MapOpenHash< Key, Data, Cmp, HashTable > &m)
Extract values from a MapOpenHash to a DynList.
DynList< Key > settree_to_DynList(const DynSetTree< Key, Tree, Compare > &s)
Convert a DynSetTree to a DynList.
Definition ah-convert.H:942
std::map< Key, Data > maptree_to_stdmap(const DynMapTree< Key, Data, Tree, Compare > &m)
Convert a DynMapTree to a std::map.
DynArray< T > vector_to_DynArray(const std::vector< T > &v)
Convert a std::vector to a DynArray.
Definition ah-convert.H:301
DynList< T > deque_to_DynList(const std::deque< T > &d)
Convert a std::deque to a DynList.
Definition ah-convert.H:404
Array< std::pair< K, V > > map_to_Array(const std::map< K, V, Compare, Alloc > &m)
Convert a std::map to an Array of pairs.
Definition ah-convert.H:769
DynList< Key > maphash_keys_to_DynList(const MapOpenHash< Key, Data, Cmp, HashTable > &m)
Extract keys from a MapOpenHash to a DynList.
DynList< T > set_to_DynList(const std::set< T, Compare, Alloc > &s)
Convert a std::set to a DynList.
Definition ah-convert.H:654
Array< typename C::Item_Type > to_Array(const C &c)
Convert a container to an Array.
Definition ah-convert.H:167
DynMapTree< K, V > stdmap_to_DynMapTree(const std::map< K, V, Compare, Alloc > &m)
Convert a std::map to a DynMapTree.
DynArray< T > set_to_DynArray(const std::set< T, Compare, Alloc > &s)
Convert a std::set to a DynArray.
Definition ah-convert.H:699
Array< Key > settree_to_Array(const DynSetTree< Key, Tree, Compare > &s)
Convert a DynSetTree to an Array.
Definition ah-convert.H:963
std::vector< typename C::Item_Type > to_vector(const C &c)
Convert a container to a std::vector.
Definition ah-convert.H:238
DynArray< Key > sethash_to_DynArray(const DynHashTable< Key, HashTable, Cmp > &s)
Convert a DynHashTable (hash set) to a DynArray.
std::deque< typename C::Item_Type > to_deque(const C &c)
Convert a container to a std::deque.
Definition ah-convert.H:384
DynArray< typename C::Item_Type > to_DynArray(const C &c)
Convert a container to a DynArray.
Definition ah-convert.H:323
DynDlist< T > dynarray_to_DynDlist(const DynArray< T > &a)
Convert a DynArray to a DynDlist.
Definition ah-convert.H:524
DynList< T > init_to_DynList(std::initializer_list< T > il)
Convert an initializer_list to a DynList.
Definition ah-convert.H:843
DynArray< T > init_to_DynArray(std::initializer_list< T > il)
Convert an initializer_list to a DynArray.
Definition ah-convert.H:893
Open addressing hash map for key-value pairs.
FooMap m(5, fst_unit_pair_hash, snd_unit_pair_hash)
Dynamic array container with automatic resizing.
Lazy and scalable dynamic array implementation.
Dynamic doubly linked list implementation.
Dynamic map with open hashing.
Dynamic key-value map based on balanced binary search trees.
Dynamic set implementations based on hash tables.
Dynamic set implementations based on balanced binary search trees.
DynList< int > l