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
Permission is hereby granted, free of charge, to any person obtaining a copy
15
of this software and associated documentation files (the "Software"), to deal
16
in the Software without restriction, including without limitation the rights
17
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
copies of the Software, and to permit persons to whom the Software is
19
furnished to do so, subject to the following conditions:
20
21
The above copyright notice and this permission notice shall be included in all
22
copies or substantial portions of the Software.
23
24
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
SOFTWARE.
31
*/
32
33
# include <iostream>
34
# include <
ahFunctional.H
>
35
# include <
tpl_dynArray.H
>
36
37
using namespace
std
;
38
39
int
main
()
40
{
41
DynList<int>
l
= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
42
DynArray<int>
a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
43
44
using
It1
=
DynList<int>::Iterator
;
45
using
It2
=
DynArray<int>::Iterator
;
46
47
It2
it2(a);
48
49
for
(
Pair_Iterator<It1, It2>
it{
It1
(
l
),
It2
(a)}; it.
has_curr
(); it.next())
50
;
51
52
// for (Pair_Iterator<It1, It2> it(It1(l), it2); it.has_curr(); it.next())
53
// cout << it.get_curr().first << " " << it.get_curr().second << endl;
54
}
ahFunctional.H
Functional programming utilities for Aleph-w containers.
Aleph::DynArray::Iterator
Iterator on the items of array.
Definition
tpl_dynArray.H:1382
Aleph::DynArray
Definition
tpl_dynArray.H:208
Aleph::DynList::Iterator
Iterator on the items of list.
Definition
htlist.H:1420
Aleph::DynList
Doubly-linked list (defined in tpl_dynList.H).
Definition
htlist.H:1155
Aleph::Pair_Iterator
Iterator that zips two other iterators.
Definition
ahFunctional.H:1707
Aleph::Pair_Iterator::has_curr
bool has_curr() const noexcept
Check if both iterators have current elements.
Definition
ahFunctional.H:1726
Aleph::blossom_maximum_cardinality_matching
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Definition
Blossom.H:466
std
STL namespace.
main
int main()
Definition
test-pair-it.C:39
tpl_dynArray.H
Lazy and scalable dynamic array implementation.
l
DynList< int > l
Definition
tree-node-common.H:69
Examples
test-pair-it.C
Generated by
1.9.8