45 template<
typename TYPE>
55 template<
typename TYPE>
65 template<
typename TYPE>
78 template<
typename TYPE,
typename Callback>
92 template<
typename TYPE,
typename Callback>
106 template<
typename TYPE,
typename Callback>
118 template<
typename TYPE>
130 template<
typename TYPE>
143 template<
typename TYPE,
typename Callback>
157 template<
typename TYPE,
typename Callback>
169 template<
typename TYPE>
182 template<
typename TYPE,
typename Callback>
195 template<
typename TYPE>
209 template<
typename TYPE,
typename Callback>
224 template<
typename TYPE,
typename Callback>
239 template<
typename TYPE,
typename Callback_O,
typename Callback_C>
255 template<
typename TYPE,
typename Callback_O,
typename Callback_C>
267 template<
typename TYPE>
279 template<
typename TYPE>
289 template<
typename TYPE>
300 template<
typename TYPE>
315 template<
typename TYPE,
typename Callback>
328 template<
typename TYPE>
340 template<
typename TYPE,
typename Callback>
353 template<
typename TYPE,
typename Callback>
366 template<
typename TYPE,
typename Callback>
369 const Callback& compares);
380 template<
typename TYPE,
typename Callback>
383 const Callback& compares);
403 template<
typename TYPE,
typename Callback>
406 const Callback& compares,
bool isStable =
false);
425 template<
typename TYPE,
typename Callback>
428 const Callback& compares);
443 template<
typename TYPE,
typename Callback>
446 const Callback& compares);
461 template<
typename TYPE,
typename Callback>
464 const Callback& compares);
478 template<
typename TYPE,
typename Callback>
481 const Callback& compares);
495 template<
typename TYPE,
typename Callback>
511 template<
typename TYPE,
typename Callback>
514 const Callback& compares);
527 template<
typename TYPE,
typename Callback>
530 const Callback& compares);
543 template<
typename TYPE,
typename Callback>
546 const Callback& compares,
u_integer depth_limit);
562 template<
typename TYPE,
typename Callback>
581 template<
typename TYPE,
typename Callback>
584 const Callback& compares);
592 template <
typename TYPE>
601 template<
typename TYPE>
609 template<
typename TYPE>
611 return backOf(*it, steps);
617 template<
typename TYPE,
typename Callback>
620 const Callback &condition) ->
bool {
621 return allOf(*begin, *end, condition);
627 template<
typename TYPE,
typename Callback>
630 const Callback &condition) ->
bool {
631 return anyOf(*begin, *end, condition);
637 template<
typename TYPE,
typename Callback>
640 const Callback &condition) ->
bool {
641 return noneOf(*begin, *end, condition);
647 template <
typename TYPE>
650 return find(*begin, *end, target);
656 template <
typename TYPE>
659 return find(*begin, n, target);
665 template<
typename TYPE,
typename Callback>
669 return find(*begin, *end, condition);
675 template <
typename TYPE,
typename Callback>
678 return find(*begin, n, condition);
684 template <
typename TYPE>
687 return count(*begin, *end, target);
693 template <
typename TYPE,
typename Callback>
696 const Callback& condition) ->
u_integer {
697 return count(*begin, *end, condition);
703 template <
typename TYPE>
706 return equal(*begin1, *end1, *begin2, *end2);
712 template <
typename TYPE,
typename Callback>
715 Callback operation) ->
void {
716 forEach(*begin, *end, operation);
722 template <
typename TYPE,
typename Callback>
725 return forEach(*begin, n, operation);
731 template<
typename TYPE>
733 const TYPE& value) ->
void {
734 fill(*begin, *end, value);
740 template<
typename TYPE>
742 return fill(*begin, n, value);
748 template <
typename TYPE>
756 template <
typename TYPE>
759 return copy(*begin_src, *end_src, *begin_tar);
765 template<
typename TYPE,
typename Callback>
769 return copy(*begin_src, *end_src, *begin_tar, condition);
775 template<
typename TYPE>
783 template <
typename TYPE,
typename Callback>
786 const Callback& compares) ->
bool {
787 return compare(*it1, *it2, compares);
793 template<
typename TYPE,
typename Callback>
803 template<
typename TYPE,
typename Callback>
806 const Callback& compares) ->
void {
813 template<
typename TYPE,
typename Callback>
816 const Callback& compares) ->
void {
823 template<
typename TYPE,
typename Callback>
826 const Callback& compares) ->
void{
833 template<
typename TYPE,
typename Callback>
836 const Callback& compares) ->
void{
844 template<
typename TYPE,
typename Callback>
853 template <
typename TYPE>
856 auto it1 = strongPtr(end.
clone());
857 auto it2 = strongPtr(begin.
clone());
861 template<
typename TYPE>
863 return strongPtr(it + steps);
866 template<
typename TYPE>
871 template<
typename TYPE,
typename Callback>
872 requires original::Condition<Callback, TYPE>
874 const Callback& condition) {
876 for (;
distance(*it, end) <= 0; it->next()){
877 if (!condition(it->get())){
884 template<
typename TYPE,
typename Callback>
887 const Callback& condition) {
889 for (;
distance(*it, end) <= 0; it->next()){
890 if (condition(it->get())){
897 template<
typename TYPE,
typename Callback>
900 const Callback& condition) {
902 for (;
distance(*it, end) <= 0; it->next()){
903 if (condition(it->get())){
910 template <
typename TYPE>
914 while (it->isValid() && !it->equal(end)) {
915 if (it->get() == target) {
923 template <
typename TYPE>
926 for (
u_integer i = 0; i < n; i += 1, it->next())
928 if (it->get() == target)
return it;
933 template<
typename TYPE,
typename Callback>
934 requires original::Condition<Callback, TYPE>
938 while (it->isValid() && !it->equal(end)) {
939 if (condition(it->get())) {
947 template <
typename TYPE,
typename Callback>
948 requires original::Condition<Callback, TYPE>
951 for (
u_integer i = 0; i < n; i += 1, it->next())
953 if (condition(it->get()))
return it;
958 template <
typename TYPE>
964 while (it->isValid() && distance(end, *it) != -1) {
965 if (it->get() == target) {
973 template <
typename TYPE,
typename Callback>
974 requires original::Condition<Callback, TYPE>
980 while (it->isValid() && distance(end, *it) != -1) {
981 if (condition(it->get())) {
989 template <
typename TYPE>
996 while (it1->isValid() && it2->isValid() && !it1->equal(end1) && !it2->equal(end2)) {
1000 const bool res = it1->equal(end1) && it2->equal(end2) && it1->get() == it2->get();
1004 template <
typename TYPE,
typename Callback>
1005 requires original::Operation<Callback, TYPE>
1007 Callback operation) ->
void
1010 for (; !it->equal(end); it->next()) {
1011 operation(it->get());
1013 operation(it->get());
1016 template <
typename TYPE,
typename Callback>
1017 requires original::Operation<Callback, TYPE>
1021 for (
u_integer i = 0; i < n; i += 1, it->next())
1023 operation(it->get());
1028 template<
typename TYPE,
typename Callback_O,
typename Callback_C>
1029 requires original::Operation<Callback_O, TYPE> && original::Condition<Callback_C, TYPE>
1031 const Callback_C &condition) ->
void {
1033 for (; !it->equal(end); it->next()) {
1034 if (condition(it->get()))
1035 operation(it->get());
1038 if (condition(it->get()))
1039 operation(it->get());
1042 template<
typename TYPE,
typename Callback_O,
typename Callback_C>
1043 requires original::Operation<Callback_O, TYPE> && original::Condition<Callback_C, TYPE>
1047 for (
u_integer i = 0; i < n; i += 1, it->next())
1049 if (condition(it->get()))
1050 operation(it->get());
1055 template<
typename TYPE>
1060 while (!it->equal(end)){
1067 template<
typename TYPE>
1078 template <
typename TYPE>
1083 TYPE tmp = it_2->get();
1084 it_2->set(it_1->get());
1088 template <
typename TYPE>
1091 auto it_src =
strongPtr(begin_src.clone());
1092 auto it_tar =
strongPtr(begin_tar.clone());
1093 while (!it_src->equal(end_src)){
1094 it_tar->set(it_src->get());
1098 it_tar->set(it_src->get());
1103 template<
typename TYPE,
typename Callback>
1104 requires original::Condition<Callback, TYPE>
1107 auto it_src =
strongPtr(begin_src.clone());
1108 auto it_tar =
strongPtr(begin_tar.clone());
1109 while (!it_src->equal(end_src)){
1110 if (condition(it_src->get())){
1111 it_tar->set(it_src->get());
1116 if (condition(it_src->get())){
1117 it_tar->set(it_src->get());
1123 template<
typename TYPE>
1128 while (distance(right, left) > 0){
1136 template <
typename TYPE,
typename Callback>
1137 requires original::Compare<Callback, TYPE>
1139 const Callback& compares) ->
bool
1141 return compares(it1.get(), it2.get());
1144 template <
typename TYPE,
typename Callback>
1145 requires original::Compare<Callback, TYPE>
1149 if (distance(current, begin) < 0)
1153 while ((distance(*it, begin) + 1) * 2 - 1 <= distance(range, begin))
1155 auto child = _heapGetPrior(begin, range, *it, compares);
1156 if (compare(it, child, compares))
1165 template <
typename TYPE,
typename Callback>
1166 requires original::Compare<Callback, TYPE>
1168 const Callback& compares) ->
void
1171 while (distance(*it, begin) > 0)
1173 auto parent = frontOf(begin, (distance(*it, begin) + 1) / 2 - 1);
1174 if (compare(it, parent, compares))
1185 template <
typename TYPE,
typename Callback>
1186 requires original::Compare<Callback, TYPE>
1188 const Callback& compares) ->
void
1190 auto it = frontOf(begin, (distance(end, begin) + 1) / 2 - 1);
1191 for (; distance(*it, begin) >= 0; it->prev())
1193 heapAdjustDown(begin, end, *it, compares);
1197 template<
typename TYPE,
typename Callback>
1198 requires original::Compare<Callback, TYPE>
1200 const Callback &compares,
const bool isStable) {
1204 template<
typename TYPE,
typename Callback>
1207 const Callback &compares) {
1212 _introSort(begin, end, compares, depth_limit);
1215 template<
typename TYPE,
typename Callback>
1218 const Callback &compares) {
1222 template<
typename TYPE,
typename Callback>
1225 const Callback& compares) {
1229 heapInit(begin, end, std::not_fn(compares));
1231 while (
distance(*right, begin) > 0){
1232 swap(begin, *right);
1238 template <
typename TYPE,
typename Callback>
1243 if ((distance(parent, begin) + 1) * 2 <= distance(range, begin))
1245 auto left = frontOf(begin, (distance(parent, begin) + 1) * 2 - 1);
1246 auto right = frontOf(begin, (distance(parent, begin) + 1) * 2);
1247 if (compare(left, right, compares))
1253 return frontOf(begin, (distance(parent, begin) + 1) * 2 - 1);
1256 template<
typename TYPE,
typename Callback>
1257 requires original::Compare<Callback, TYPE>
1258 original::strongPtr<original::iterator<TYPE>>
1260 const Callback &compares) {
1261 auto mid = frontOf(begin, distance(end, begin) / 2);
1262 if ((!compare(begin, *mid, compares) && !compare(end, begin, compares))
1263 || (!compare(*mid, begin, compares) && !compare(begin, end, compares))){
1266 if ((!compare(*mid, begin, compares) && !compare(end, *mid, compares))
1267 || (!compare(begin, *mid, compares) && !compare(*mid, end, compares))){
1273 template<
typename TYPE,
typename Callback>
1274 requires original::Compare<Callback, TYPE>
1275 original::strongPtr<original::iterator<TYPE>>
1277 const Callback &compares) {
1280 auto pivot = _introSortGetPivot(begin, end, compares);
1281 TYPE tmp = left->getElem();
1282 left->set(pivot->getElem());
1283 bool move_right =
true;
1284 while (distance(right, left) > 0) {
1286 if (compare(right, left, std::not_fn(compares))){
1293 if (compare(right, left, std::not_fn(compares))){
1305 template<
typename TYPE,
typename Callback>
1306 requires original::Compare<Callback, TYPE>
1309 const Callback &compares,
u_integer depth_limit) {
1310 if (distance(end, begin) <= 16) {
1311 insertionSort(begin, end, compares);
1315 if (depth_limit == 0) {
1316 heapSort(begin, end, compares);
1320 auto pivot = _introSortPartition(begin, end, compares);
1321 _introSort(begin, *pivot, compares, depth_limit - 1);
1322 _introSort(*pivot, end, compares, depth_limit - 1);
1325 template<
typename TYPE,
typename Callback>
1326 requires original::Compare<Callback, TYPE>
1328 const Callback &compares) {
1332 auto left =
frontOf(begin, 1);
1333 while (
distance(end, *left) >= 0) {
1334 auto current =
strongPtr(left->clone());
1335 auto prev =
backOf(current, 1);
1336 while (
distance(*current, begin) > 0 &&
compare(current, prev, compares)){
1337 swap(current, prev);
1345 template<
typename TYPE,
typename Callback>
1354 if (
compare(left, right, compares)){
1376 template<
typename TYPE,
typename Callback>
1379 const Callback &compares) {
1390 auto mid =
frontOf(begin, dis / 2);
Utility class containing generic container algorithms.
Definition algorithms.h:35
static auto frontOf(const strongPtr< iterator< TYPE > > it, integer steps) -> strongPtr< iterator< TYPE > >
Pointer overload version of frontOf()
Definition algorithms.h:602
static auto copy(const strongPtr< iterator< TYPE > > begin_src, const strongPtr< iterator< TYPE > > end_src, const strongPtr< iterator< TYPE > > begin_tar) -> strongPtr< iterator< TYPE > >
Pointer overload version of copy()
Definition algorithms.h:757
static auto _heapGetPrior(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > range, const strongPtr< iterator< TYPE > > parent, const Callback &compares) -> strongPtr< iterator< TYPE > >
Pointer overload version of _heapGetPrior()
Definition algorithms.h:846
static void fill(const iterator< TYPE > &begin, const iterator< TYPE > &end, const TYPE &value=TYPE{})
Fills a range with a specific value.
static bool anyOf(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &condition)
Checks if any elements satisfy condition.
Definition algorithms.h:886
static auto backOf(const strongPtr< iterator< TYPE > > it, integer steps) -> strongPtr< iterator< TYPE > >
Pointer overload version of backOf()
Definition algorithms.h:610
static auto find(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const TYPE &target) -> strongPtr< iterator< TYPE > >
Pointer overload version of find()
Definition algorithms.h:648
static integer distance(const iterator< TYPE > &end, const iterator< TYPE > &begin)
Calculates distance between two iterators.
static void heapInit(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &compares)
Initializes a heap structure from a range of iterators.
static strongPtr< iterator< TYPE > > _heapGetPrior(const iterator< TYPE > &begin, const iterator< TYPE > &range, const iterator< TYPE > &parent, const Callback &compares)
Get parent node's priority child in heap structure.
static auto heapInit(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &compares) -> void
Pointer overload version of heapInit()
Definition algorithms.h:815
static void forEach(const iterator< TYPE > &begin, const iterator< TYPE > &end, Callback_O operation, const Callback_C &condition)
Apply operation to elements with condition check.
static auto heapAdjustUp(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > current, const Callback &compares) -> void
Pointer overload version of heapAdjustUp()
Definition algorithms.h:805
static auto find(const strongPtr< iterator< TYPE > > begin, u_integer n, const Callback &condition) -> strongPtr< iterator< TYPE > >
Pointer overload version of find()
Definition algorithms.h:677
static auto allOf(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &condition) -> bool
Pointer overload version of allOf()
Definition algorithms.h:619
static bool equal(const iterator< TYPE > &begin1, const iterator< TYPE > &end1, const iterator< TYPE > &begin2, const iterator< TYPE > &end2)
Checks if two iterator ranges are equal.
static auto forEach(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, Callback operation) -> void
Pointer overload version of forEach()
Definition algorithms.h:714
static auto swap(const strongPtr< iterator< TYPE > > it1, const strongPtr< iterator< TYPE > > it2) noexcept -> void
Pointer overload version of swap()
Definition algorithms.h:749
static strongPtr< iterator< TYPE > > backOf(const iterator< TYPE > &it, integer steps)
Gets iterator n steps backward.
static auto insertionSort(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &compares) -> void
Pointer overload version of insertionSort()
Definition algorithms.h:835
static void _stableSortMerge(const iterator< TYPE > &begin, const iterator< TYPE > &mid, const iterator< TYPE > &end, const Callback &compares)
Merges two sorted sub-ranges during merge sort.
Definition algorithms.h:1347
static auto equal(const strongPtr< iterator< TYPE > > begin1, const strongPtr< iterator< TYPE > > end1, const strongPtr< iterator< TYPE > > begin2, const strongPtr< iterator< TYPE > > end2) -> bool
Pointer overload version of equal()
Definition algorithms.h:704
static void sort(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &compares, bool isStable=false)
Sorts a range of elements using either stable or unstable sorting algorithm.
Definition algorithms.h:1199
static auto forEach(const strongPtr< iterator< TYPE > > begin, u_integer n, Callback operation) -> strongPtr< iterator< TYPE > >
Pointer overload version of forEach()
Definition algorithms.h:724
static auto fill(const strongPtr< iterator< TYPE > > begin, u_integer n, const TYPE &value) -> strongPtr< iterator< TYPE > >
Pointer overload version of fill()
Definition algorithms.h:741
static auto count(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const TYPE &target) -> u_integer
Pointer overload version of count()
Definition algorithms.h:685
static strongPtr< iterator< TYPE > > fill(const iterator< TYPE > &begin, u_integer n, const TYPE &value=TYPE{})
Fill range with value (fixed number of elements)
static auto reverse(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end) -> strongPtr< iterator< TYPE > >
Pointer overload version of reverse()
Definition algorithms.h:776
static auto heapAdjustDown(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > range, const strongPtr< iterator< TYPE > > current, const Callback &compares) -> void
Pointer overload version of heapAdjustDown()
Definition algorithms.h:795
static strongPtr< iterator< TYPE > > copy(const iterator< TYPE > &begin_src, const iterator< TYPE > &end_src, const iterator< TYPE > &begin_tar, Callback condition=filter< TYPE >{})
Conditional copy with filtering.
static void swap(const iterator< TYPE > &it1, const iterator< TYPE > &it2) noexcept
Swaps the values of two elements.
static void heapAdjustUp(const iterator< TYPE > &begin, const iterator< TYPE > ¤t, const Callback &compares)
Adjusts a heap structure upwards from a given iterator.
static strongPtr< iterator< TYPE > > find(const iterator< TYPE > &begin, u_integer n, const TYPE &target)
Find first element satisfying condition in iterator range.
static strongPtr< iterator< TYPE > > find(const iterator< TYPE > &begin, u_integer n, const Callback &condition)
Fill range with value (fixed number of elements)
static void introSort(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &compares)
Sorts a range of elements using introspective sort.
Definition algorithms.h:1206
static auto distance(const strongPtr< iterator< TYPE > > end, const strongPtr< iterator< TYPE > > begin) -> integer
Pointer overload version of distance()
Definition algorithms.h:593
static auto anyOf(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &condition) -> bool
Pointer overload version of anyOf()
Definition algorithms.h:629
static auto compare(const strongPtr< iterator< TYPE > > it1, const strongPtr< iterator< TYPE > > it2, const Callback &compares) -> bool
Pointer overload version of compare()
Definition algorithms.h:785
static void heapSort(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &compares)
Sorts a range of elements using heap sort.
Definition algorithms.h:1224
static void forEach(const iterator< TYPE > &begin, const iterator< TYPE > &end, Callback operation)
Applies an operation to each element in the range.
static strongPtr< iterator< TYPE > > copy(const iterator< TYPE > &begin_src, const iterator< TYPE > &end_src, const iterator< TYPE > &begin_tar)
Copies a range of elements from one iterator to another.
static auto find(const strongPtr< iterator< TYPE > > begin, u_integer n, const TYPE &target) -> strongPtr< iterator< TYPE > >
Pointer overload version of find()
Definition algorithms.h:657
static strongPtr< iterator< TYPE > > reverse(const iterator< TYPE > &begin, const iterator< TYPE > &end)
Range-based reverse operation.
static strongPtr< iterator< TYPE > > forEach(const iterator< TYPE > &begin, u_integer n, Callback operation)
Applies an operation to the first n elements in the range.
static strongPtr< iterator< TYPE > > find(const iterator< TYPE > &begin, const iterator< TYPE > &end, const TYPE &target)
Find first occurrence of target in iterator range.
static void insertionSort(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &compares)
Sorts a range of elements using insertion sort.
Definition algorithms.h:1327
static auto heapSort(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &compares) -> void
Pointer overload version of heapSort()
Definition algorithms.h:825
static auto fill(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const TYPE &value) -> void
Pointer overload version of fill()
Definition algorithms.h:732
static void stableSort(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &compares)
Performs stable hybrid sort on element range.
Definition algorithms.h:1217
static auto count(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &condition) -> u_integer
Pointer overload version of count()
Definition algorithms.h:695
static bool compare(const iterator< TYPE > &it1, const iterator< TYPE > &it2, const Callback &compares)
Compares two elements using a comparison callback.
static strongPtr< iterator< TYPE > > frontOf(const iterator< TYPE > &it, integer steps)
Gets iterator n steps forward.
static auto find(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &condition) -> strongPtr< iterator< TYPE > >
Pointer overload version of find()
Definition algorithms.h:667
static strongPtr< iterator< TYPE > > forEach(const iterator< TYPE > &begin, u_integer n, Callback_O operation, const Callback_C &condition)
Conditional forEach with element count limit.
static bool allOf(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &condition)
Checks if all elements satisfy condition.
Definition algorithms.h:873
static void heapAdjustDown(const iterator< TYPE > &begin, const iterator< TYPE > &range, const iterator< TYPE > ¤t, const Callback &compares)
Adjusts a heap structure downwards starting from a given iterator.
static u_integer count(const iterator< TYPE > &begin, const iterator< TYPE > &end, const TYPE &target)
Counts occurrences of a target element in the range.
static void _stableSort(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &compares)
Recursive implementation of stable sort.
Definition algorithms.h:1378
static strongPtr< iterator< TYPE > > find(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &condition)
Find first element satisfying condition in iterator range.
static auto noneOf(const strongPtr< iterator< TYPE > > begin, const strongPtr< iterator< TYPE > > end, const Callback &condition) -> bool
Pointer overload version of noneOf()
Definition algorithms.h:639
static bool noneOf(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &condition)
Checks if no elements satisfy condition.
Definition algorithms.h:899
static auto copy(const strongPtr< iterator< TYPE > > begin_src, const strongPtr< iterator< TYPE > > end_src, const strongPtr< iterator< TYPE > > begin_tar, Callback condition) -> strongPtr< iterator< TYPE > >
Pointer overload version of copy()
Definition algorithms.h:767
static u_integer count(const iterator< TYPE > &begin, const iterator< TYPE > &end, const Callback &condition)
Counts occurrences of elements satisfying condition in the range.
Base class for filter operations.
Definition filter.h:31
iterAdaptor first()
Returns an iterator pointing to the first element.
Definition iterable.h:472
iterAdaptor last()
Returns an iterator pointing to the last element.
Definition iterable.h:478
Base iterator interface that supports common operations for iteration.
Definition iterator.h:35
iterator * clone() const override=0
Creates a clone of the iterator.
Shared ownership smart pointer with strong references.
Definition refCntPtr.h:100
Dynamic array container with amortized constant time operations.
Definition vector.h:42
void pushEnd(const TYPE &e) override
Inserts an element at the end of the vector.
Definition vector.h:656
Combines Comparable and CallbackOf for comparison callbacks.
Definition types.h:76
Constraint for predicate callbacks.
Definition types.h:97
Constraint for mutating operations.
Definition types.h:117
Filter base class and derived filter classes for various matching operations.
Defines the iterator class for traversing and manipulating container elements.
Main namespace for the project Original.
Definition algorithms.h:21
std::uint32_t u_integer
32-bit unsigned integer type for sizes/indexes
Definition config.h:17
std::int64_t integer
64-bit signed integer type for arithmetic operations
Definition config.h:15
Reference-counted smart pointer hierarchy.
Type system foundations and concept definitions.
Dynamic array container with automatic resizing.