Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
test-pair-it.C
Go to the documentation of this file.
1
2/* Aleph-w
3
4 / \ | | ___ _ __ | |__ __ __
5 / _ \ | |/ _ \ '_ \| '_ \ ____\ \ /\ / / Data structures & Algorithms
6 / ___ \| | __/ |_) | | | |_____\ V V / version 1.9c
7 /_/ \_\_|\___| .__/|_| |_| \_/\_/ https://github.com/lrleon/Aleph-w
8 |_|
9
10 This file is part of Aleph-w library
11
12 Copyright (c) 2002-2018 Leandro Rabindranath Leon
13
14 This program is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program. If not, see <https://www.gnu.org/licenses/>.
26*/
27
28# include <iostream>
29# include <ahFunctional.H>
30# include <tpl_dynArray.H>
31
32using namespace std;
33
34int main()
35{
36 DynList<int> l = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
37 DynArray<int> a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
38
41
42 It2 it2(a);
43
44 for (Pair_Iterator<It1, It2> it{It1(l), It2(a)}; it.has_curr(); it.next())
45 ;
46
47 // for (Pair_Iterator<It1, It2> it(It1(l), it2); it.has_curr(); it.next())
48 // cout << it.get_curr().first << " " << it.get_curr().second << endl;
49}
Functional programming utilities for Aleph-w containers.
Iterator on the items of array.
Iterator on the items of list.
Definition htlist.H:1420
Dynamic singly linked list with functional programming support.
Definition htlist.H:1155
Iterator that zips two other iterators.
bool has_curr() const noexcept
Check if both iterators have current elements.
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.
STL namespace.
int main()
Lazy and scalable dynamic array implementation.
DynList< int > l