Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
managed_linear_set.hpp
Go to the documentation of this file.
1
6/*
7 * This file is part of Algorithms library toolkit.
8 * Copyright (C) 2017 Jan Travnicek (jan.travnicek@fit.cvut.cz)
9
10 * Algorithms library toolkit is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14
15 * Algorithms library toolkit is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19
20 * You should have received a copy of the GNU General Public License
21 * along with Algorithms library toolkit. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#pragma once
25
28
29namespace ext {
30
39template < class T, class Compare = std::less<T>, class Alloc = std::allocator<T> >
46
47 std::vector < std::function < void ( const T & ) > > insertCallbacks;
48
49 std::vector < std::function < void ( const T & ) > > removeCallbacks;
50
51 void fireInsert ( const T & element ) const {
52 for ( const std::function < void ( const T & ) > & callback : insertCallbacks ) {
53 callback ( element );
54 }
55 }
56
57 void fireRemove ( const T & element ) const {
58 for ( const std::function < void ( const T & ) > & callback : removeCallbacks ) {
59 callback ( element );
60 }
61 }
62
70 bool eq ( const T & first, const T & second ) {
71 return ! m_data.value_comp ( ) ( first, second ) && ! m_data.value_comp ( ) ( second, first );
72 }
73
74public:
75 void addInsertCallback ( const std::function < void ( const T & ) > & callback ) {
76 insertCallbacks.push_back ( callback );
77 }
78
79 void addRemoveCallback ( const std::function < void ( const T & ) > & callback ) {
80 removeCallbacks.push_back ( callback );
81 }
82
87 typedef T value_type;
88
94
100
106
112
120 explicit managed_linear_set (const Compare& comp = Compare(), const Alloc& alloc = Alloc()) : m_data ( comp, alloc ) {
121 }
122
129 explicit managed_linear_set (const Alloc& alloc) : m_data ( alloc, Compare ( ) ) {
130 }
131
141 template <class InputIterator>
142 managed_linear_set (InputIterator first, InputIterator last, const Compare& comp = Compare(), const Alloc& alloc = Alloc()) : m_data ( first, last, comp, alloc ) {
143 }
144
152 template < class Iterator >
154 }
155
162 managed_linear_set (const managed_linear_set& x) : m_data ( x.m_data ) {
163 }
164
172 managed_linear_set ( const managed_linear_set & x, const Alloc & alloc ) : m_data ( x.m_data, x.value_comp ( ), alloc ) {
173 }
174
182 for ( const T & elem : x ) {
183 x.fireRemove ( elem );
184 }
185
186 m_data = std::move ( x.m_data );
187 }
188
196 managed_linear_set (managed_linear_set&& x, const Alloc& alloc) : m_data ( x.value_comp ( ), alloc ) {
197 for ( const T & elem : x ) {
198 x.fireRemove ( elem );
199 }
200
201 m_data = std::move ( x.m_data );
202 }
203
212 managed_linear_set (std::initializer_list<T> il, const Compare& comp = Compare(), const Alloc& alloc = Alloc()) : m_data ( std::move ( il ), comp, alloc ) {
213 }
214
220 }
221
228 iterator begin() & noexcept {
229 return m_data.begin ( );
230 }
231
238 const_iterator begin() const & noexcept {
239 return m_data.begin ( );
240 }
241
248 auto begin ( ) && noexcept {
249 return std::move ( * this ).begin ( );
250 }
251
258 const_iterator cbegin() const noexcept {
259 return m_data.cbegin ( );
260 }
261
268 iterator end() & noexcept {
269 return m_data.end ( );
270 }
271
278 const_iterator end() const & noexcept {
279 return m_data.end ( );
280 }
281
288 auto end ( ) && noexcept {
289 return std::move ( * this ).end ( );
290 }
291
298 const_iterator cend() const noexcept {
299 return m_data.cend ( );
300 }
301
308 auto range ( ) & {
309 auto endIter = end ( );
310 auto beginIter = begin ( );
311 return ext::iterator_range < decltype ( endIter ) > ( beginIter, endIter );
312 }
313
320 auto range ( ) const & {
321 auto endIter = end ( );
322 auto beginIter = begin ( );
323 return ext::iterator_range < decltype ( endIter ) > ( beginIter, endIter );
324 }
325
332 auto range ( ) && {
333 auto endIter = std::move ( * this ).end ( );
334 auto beginIter = std::move ( * this ).begin ( );
335 return ext::iterator_range < decltype ( endIter ) > ( beginIter, endIter );
336 }
337
343 void clear() noexcept {
344 for ( const T & elem : m_data ) {
345 fireRemove ( elem );
346 }
347
348 m_data.clear ( );
349 }
350
357 size_t count ( const T& value ) const {
358 return m_data.count ( value );
359 }
360
368 return m_data.crbegin ( );
369 }
370
377 const_reverse_iterator crend() const noexcept {
378 return m_data.crend ( );
379 }
380
391 template <class... Args>
392 std::pair < iterator, bool > emplace ( Args && ... args ) {
393 return insert ( T ( std::forward ( args ) ... ) );
394 }
395
407 template <class... Args>
408 iterator emplace_hint ( const_iterator position, Args && ... args ) {
409 return insert ( position, T ( std::forward ( args ) ... ) );
410 }
411
418 bool empty ( ) const noexcept {
419 return m_data.empty ( );
420 }
421
430 std::pair < const_iterator, const_iterator > equal_range ( const T & val ) const {
431 return std::make_pair ( lower_bound ( val ), upper_bound ( val ) );
432 }
433
442 std::pair < iterator, iterator > equal_range ( const T & val ) {
443 return std::make_pair ( lower_bound ( val ), upper_bound ( val ) );
444 }
445
455 fireRemove ( * position );
456 return m_data.erase ( position );
457 }
458
467 size_t erase ( const T & val ) {
468 const_iterator position = lower_bound ( val );
469 if ( position != end ( ) && eq ( * position, val ) ) {
470 fireRemove ( * position );
471 m_data.erase ( position );
472 return 1;
473 } else {
474 return 0;
475 }
476 }
477
488 for ( const T & elem : ext::make_iterator_range ( first, last ) )
489 fireRemove ( elem );
490
491 return m_data.erase ( first, last );
492 }
493
502 const_iterator find ( const T & val ) const {
503 m_data.find ( val );
504 }
505
514 iterator find ( const T & val ) {
515 m_data.find ( val );
516 }
517
524 Alloc get_allocator() const noexcept {
525 return m_data.get_allocator ( );
526 }
527
536 std::pair < iterator, bool > insert ( const T & val ) {
537 return insert ( T ( val ) );
538 }
539
548 std::pair < iterator, bool > insert ( T && val ) {
549 const_iterator position = lower_bound ( val );
550 if ( position != end ( ) && eq ( * position, val ) )
551 return std::make_pair ( position, false );
552 else {
553 fireInsert ( val );
554 return std::make_pair ( m_data.insert ( position, std::move ( val ) ), true );
555 }
556 }
557
567 iterator insert ( const_iterator position, const T & val ) {
568 return insert ( position, T ( val ) );
569 }
570
580 iterator insert (const_iterator position, T&& val) {
581 if ( position != end ( ) && eq ( * position, val ) )
582 return position;
583
584 if ( position != end ( ) && m_comp ( val, * position ) && ( position == begin ( ) || m_comp ( * std::prev ( position ), val ) ) ) {
585 fireInsert ( val );
586 return m_data.emplace ( position, std::move ( val ) );
587 }
588
589 return insert ( std::move ( val ) ).first;
590 }
591
599 template <class InputIterator>
600 void insert (InputIterator first, InputIterator last) {
601 for ( const T & elem : ext::make_iterator_range ( first, last ) )
602 fireInsert ( elem );
603
604 m_data.insert ( first, last );
605 }
606
613 void insert (std::initializer_list<T> il) {
614 insert ( il.begin ( ), il.end ( ) );
615 }
616
623 Compare key_comp() const {
624 return m_data.key_comp();
625 }
626
635 iterator lower_bound ( const T & val ) {
636 return m_data.lower_bound ( val );
637 }
638
647 const_iterator lower_bound (const T& val) const {
648 return m_data.lower_bound ( val );
649 }
650
657 size_t max_size() const noexcept {
658 return m_data.max_size ( );
659 }
660
670 ext::set_symmetric_difference ( m_data.begin ( ), m_data.end ( ), data.begin ( ), data.end ( ), ext::make_callback_iterator ( std::bind ( & managed_linear_set::fireRemove, this, std::placeholders::_1 ) ), ext::make_callback_iterator ( std::bind ( & managed_linear_set::fireInsert, this, std::placeholders::_1 ) ) );
671
672 m_data = data.m_data;
673 return *this;
674 }
675
685 ext::set_symmetric_difference ( m_data.begin ( ), m_data.end ( ), data.begin ( ), data.end ( ), ext::make_callback_iterator ( std::bind ( & managed_linear_set::fireRemove, this, std::placeholders::_1 ) ), ext::make_callback_iterator ( std::bind ( & managed_linear_set::fireInsert, this, std::placeholders::_1 ) ) );
686
687 for ( const T & elem : data ) {
688 data.fireRemove ( elem );
689 }
690
691 m_data = std::move ( data.m_data );
692 return *this;
693 }
694
703 managed_linear_set & operator= ( std::initializer_list < T > il ) {
704 linear_set < T > data ( il );
705 ext::set_symmetric_difference ( m_data.begin ( ), m_data.end ( ), data.begin ( ), data.end ( ), ext::make_callback_iterator ( std::bind ( & managed_linear_set::fireRemove, this, std::placeholders::_1 ) ), ext::make_callback_iterator ( std::bind ( & managed_linear_set::fireInsert, this, std::placeholders::_1 ) ) );
706
707 m_data = std::move ( data );
708 return *this;
709 }
710
718 return m_data.rbegin ( );
719 }
720
728 return m_data.rbegin ( );
729 }
730
738 return m_data.rend ( );
739 }
740
747 const_reverse_iterator rend() const noexcept {
748 return m_data.rend ( );
749 }
750
757 size_t size() const noexcept {
758 return m_data.size ( );
759 }
760
767 void swap ( managed_linear_set & data ) {
768 auto thisToOther = ext::make_callback_iterator ( [ this, & data ] ( const T & element ) { this->fireRemove ( element ); data.fireInsert ( element ); } );
769 auto otherToThis = ext::make_callback_iterator ( [ this, & data ] ( const T & element ) { data.fireRemove ( element ); this->fireInsert ( element ); } );
770 ext::set_symmetric_difference ( m_data.begin ( ), m_data.end ( ), data.begin ( ), data.end ( ), thisToOther, otherToThis );
771
772 m_data.swap ( data.m_data );
773 }
774
783 iterator upper_bound ( const T & val) {
784 return m_data.upper_bound ( val );
785 }
786
795 const_iterator upper_bound (const T& val) const {
796 return m_data.upper_bound ( val );
797 }
798
805 Compare value_comp() const {
806 return m_data.value_comp ( );
807 }
808
817 auto operator <=> ( const managed_linear_set < T, Compare, Alloc > & other ) const = default;
818
819};
820
833template< class T, class ... Ts >
834std::ostream& operator<<(std::ostream& out, const ext::managed_linear_set<T, Ts ...>& value) {
835 out << "{";
836
837 bool first = true;
838 for(const T& item : value) {
839 if(!first) out << ", ";
840 first = false;
841 out << item;
842 }
843
844 out << "}";
845 return out;
846}
847
848} /* namespace ext */
849
850namespace std {
851
863template <class T, class Compare, class Alloc>
865 x.swap ( y );
866}
867
868} /* namespace std */
Implementation of iterator_range, i.e. pair of iterators. The class provides most notably begin and e...
Definition: range.hpp:24
Implementation of set mimicking the iterface of the standard library set. The inner representation is...
Definition: linear_set.hpp:45
reverse_iterator rbegin() noexcept
Getter of a reverse iterator to the begining of range of values in the container.
Definition: linear_set.hpp:687
std::pair< iterator, bool > emplace(Args &&... args)
Emplace a value to the container. Internaly the method uses insert since the place to put the value r...
Definition: linear_set.hpp:375
bool empty() const noexcept
Tests whether the container is empty.
Definition: linear_set.hpp:401
void swap(linear_set &x)
Swaps two instances of linear set.
Definition: linear_set.hpp:737
iterator lower_bound(const T &val)
Returns an iterator pointing to the first element in the range [first,last) which does not compare le...
Definition: linear_set.hpp:613
Compare value_comp() const
Getter of the value comparator instance. Actually the value_type is the same as key_type so this is a...
Definition: linear_set.hpp:773
size_t count(const T &value) const
Computes the number of values in the container.
Definition: linear_set.hpp:340
iterator end() &noexcept
Getter of an iterator to the end of range of values in the container.
Definition: linear_set.hpp:255
const_reverse_iterator crbegin() const noexcept
Getter of a const revese iterator to the begining of reverse range of values in the container.
Definition: linear_set.hpp:350
const_iterator cbegin() const noexcept
Getter of a const iterator to the begining of range of values in the container.
Definition: linear_set.hpp:245
Alloc get_allocator() const noexcept
Getter of the allocator.
Definition: linear_set.hpp:508
const_reverse_iterator crend() const noexcept
Getter of a const revese iterator to the end of reverse range of values in the container.
Definition: linear_set.hpp:360
const_iterator find(const T &val) const
Function to binary search for given value.
Definition: linear_set.hpp:478
iterator upper_bound(const T &val)
Returns an iterator pointing to the first element in the range [first,last) which compares greater th...
Definition: linear_set.hpp:751
std::pair< iterator, bool > insert(const T &val)
Inserts a new value to the container.
Definition: linear_set.hpp:520
iterator erase(const_iterator position)
Removes value from the container based on the position given by iterator.
Definition: linear_set.hpp:437
iterator begin() &noexcept
Getter of an iterator to the begining of range of values in the container.
Definition: linear_set.hpp:215
reverse_iterator rend() noexcept
Getter of a reverse iterator to the end of range of values in the container.
Definition: linear_set.hpp:707
size_t size() const noexcept
Getter of the number of values inside the container.
Definition: linear_set.hpp:727
Compare key_comp() const
Getter of the key comparator instance.
Definition: linear_set.hpp:601
size_t max_size() const noexcept
Returns the maximal number of values possible to store inside the container.
Definition: linear_set.hpp:635
const_iterator cend() const noexcept
Getter of a const iterator to the end of range of values in the container.
Definition: linear_set.hpp:285
Implementation of set mimicking the iterface of the standard library set. The inner representation is...
Definition: managed_linear_set.hpp:40
std::pair< const_iterator, const_iterator > equal_range(const T &val) const
Returns a range of values equal to the val. The range is specified by const iterators.
Definition: managed_linear_set.hpp:430
iterator erase(const_iterator position)
Removes value from the container based on the position given by iterator.
Definition: managed_linear_set.hpp:454
auto range() &
Make range of non-const begin to end iterators.
Definition: managed_linear_set.hpp:308
managed_linear_set(managed_linear_set &&x, const Alloc &alloc)
Move constructor including allocator specification.
Definition: managed_linear_set.hpp:196
const_iterator upper_bound(const T &val) const
Returns an iterator pointing to the first element in the range [first,last) which compares greater th...
Definition: managed_linear_set.hpp:795
size_t size() const noexcept
Getter of the number of values inside the container.
Definition: managed_linear_set.hpp:757
const_reverse_iterator crend() const noexcept
Getter of a const revese iterator to the end of reverse range of values in the container.
Definition: managed_linear_set.hpp:377
managed_linear_set & operator=(const managed_linear_set &data)
Copy operator of assignmet.
Definition: managed_linear_set.hpp:669
const_reverse_iterator rend() const noexcept
Getter of a const reverse iterator to the end of range of values in the container.
Definition: managed_linear_set.hpp:747
ext::vector< T, Alloc >::const_iterator iterator
The type of iterator over values in the set. It is the same as the underling vector's const iterator.
Definition: managed_linear_set.hpp:93
const_iterator cbegin() const noexcept
Getter of a const iterator to the begining of range of values in the container.
Definition: managed_linear_set.hpp:258
auto range() const &
Make range of non-const begin to end iterators.
Definition: managed_linear_set.hpp:320
iterator insert(const_iterator position, T &&val)
Inserts a new value to the container. The method accepts a position hint where to place the new value...
Definition: managed_linear_set.hpp:580
const_iterator lower_bound(const T &val) const
Returns an iterator pointing to the first element in the range [first,last) which does not compare le...
Definition: managed_linear_set.hpp:647
std::pair< iterator, bool > emplace(Args &&... args)
Emplace a value to the container. Internaly the method uses insert since the place to put the value r...
Definition: managed_linear_set.hpp:392
iterator begin() &noexcept
Getter of an iterator to the begining of range of values in the container.
Definition: managed_linear_set.hpp:228
std::pair< iterator, iterator > equal_range(const T &val)
Returns a range of values equal to the val. The range is specified by iterators.
Definition: managed_linear_set.hpp:442
iterator emplace_hint(const_iterator position, Args &&... args)
Emplace a value to the container with provided position as a hint. Internaly the method uses insert s...
Definition: managed_linear_set.hpp:408
const_reverse_iterator rbegin() const noexcept
Getter of a const reverse iterator to the begining of range of values in the container.
Definition: managed_linear_set.hpp:727
managed_linear_set(managed_linear_set &&x)
Move constructor.
Definition: managed_linear_set.hpp:181
iterator insert(const_iterator position, const T &val)
Inserts a new value to the container. The method accepts a position hint where to place the new value...
Definition: managed_linear_set.hpp:567
managed_linear_set(std::initializer_list< T > il, const Compare &comp=Compare(), const Alloc &alloc=Alloc())
Set constructor from initializer list.
Definition: managed_linear_set.hpp:212
void swap(managed_linear_set &data)
Swaps two instances of linear set.
Definition: managed_linear_set.hpp:767
const_iterator end() const &noexcept
Getter of a const iterator to the end of range of values in the container.
Definition: managed_linear_set.hpp:278
iterator lower_bound(const T &val)
Returns an iterator pointing to the first element in the range [first,last) which does not compare le...
Definition: managed_linear_set.hpp:635
managed_linear_set(InputIterator first, InputIterator last, const Compare &comp=Compare(), const Alloc &alloc=Alloc())
Set constructor from a range of values.
Definition: managed_linear_set.hpp:142
ext::vector< T, Alloc >::const_reverse_iterator reverse_iterator
The type of reverse iterator over values in the set. It is the same as the underling vector's const r...
Definition: managed_linear_set.hpp:105
void addRemoveCallback(const std::function< void(const T &) > &callback)
Definition: managed_linear_set.hpp:79
auto operator<=>(const managed_linear_set< T, Compare, Alloc > &other) const =default
Compares two set instances by less relation.
ext::vector< T, Alloc >::const_iterator const_iterator
The type of const iterator over values in the set. It is the same as the underling vector's const ite...
Definition: managed_linear_set.hpp:99
void insert(std::initializer_list< T > il)
Insert values from a range speified by initializer list.
Definition: managed_linear_set.hpp:613
bool empty() const noexcept
Tests whether the container is empty.
Definition: managed_linear_set.hpp:418
reverse_iterator rend() noexcept
Getter of a reverse iterator to the end of range of values in the container.
Definition: managed_linear_set.hpp:737
void addInsertCallback(const std::function< void(const T &) > &callback)
Definition: managed_linear_set.hpp:75
iterator end() &noexcept
Getter of an iterator to the end of range of values in the container.
Definition: managed_linear_set.hpp:268
void insert(InputIterator first, InputIterator last)
Insert values from a range speified by pair of iterators.
Definition: managed_linear_set.hpp:600
T value_type
The type of values in the set.
Definition: managed_linear_set.hpp:87
iterator erase(const_iterator first, const_iterator last)
Removes values in the specified range. The range is specified by pair of iterators.
Definition: managed_linear_set.hpp:487
managed_linear_set(const Alloc &alloc)
Constructor of the empty set with specified allocator.
Definition: managed_linear_set.hpp:129
auto range() &&
Make range of move begin to end iterators.
Definition: managed_linear_set.hpp:332
std::pair< iterator, bool > insert(T &&val)
Inserts a new value to the container.
Definition: managed_linear_set.hpp:548
const_iterator find(const T &val) const
Function to binary search for given value.
Definition: managed_linear_set.hpp:502
size_t max_size() const noexcept
Returns the maximal number of values possible to store inside the container.
Definition: managed_linear_set.hpp:657
auto end() &&noexcept
Getter of a move iterator to the end of range of values in the container.
Definition: managed_linear_set.hpp:288
std::pair< iterator, bool > insert(const T &val)
Inserts a new value to the container.
Definition: managed_linear_set.hpp:536
auto begin() &&noexcept
Getter of a move iterator to the begining of range of values in the container.
Definition: managed_linear_set.hpp:248
Compare key_comp() const
Getter of the key comparator instance.
Definition: managed_linear_set.hpp:623
const_reverse_iterator crbegin() const noexcept
Getter of a const revese iterator to the begining of reverse range of values in the container.
Definition: managed_linear_set.hpp:367
iterator upper_bound(const T &val)
Returns an iterator pointing to the first element in the range [first,last) which compares greater th...
Definition: managed_linear_set.hpp:783
const_iterator begin() const &noexcept
Getter of a const iterator to the begining of range of values in the container.
Definition: managed_linear_set.hpp:238
iterator find(const T &val)
Function to binary search for given value.
Definition: managed_linear_set.hpp:514
managed_linear_set(const managed_linear_set &x, const Alloc &alloc)
Copy constructor including allocator specification.
Definition: managed_linear_set.hpp:172
managed_linear_set(const managed_linear_set &x)
Copy constructor.
Definition: managed_linear_set.hpp:162
reverse_iterator rbegin() noexcept
Getter of a reverse iterator to the begining of range of values in the container.
Definition: managed_linear_set.hpp:717
Alloc get_allocator() const noexcept
Getter of the allocator.
Definition: managed_linear_set.hpp:524
managed_linear_set(const Compare &comp=Compare(), const Alloc &alloc=Alloc())
Default constructor of the empty set.
Definition: managed_linear_set.hpp:120
size_t count(const T &value) const
Computes the number of values in the container.
Definition: managed_linear_set.hpp:357
managed_linear_set(const ext::iterator_range< Iterator > &range)
Definition: managed_linear_set.hpp:153
const_iterator cend() const noexcept
Getter of a const iterator to the end of range of values in the container.
Definition: managed_linear_set.hpp:298
size_t erase(const T &val)
Removes value from the container.
Definition: managed_linear_set.hpp:467
Compare value_comp() const
Getter of the value comparator instance. Actually the value_type is the same as key_type so this is a...
Definition: managed_linear_set.hpp:805
~managed_linear_set()
The destructor of the linear set.
Definition: managed_linear_set.hpp:219
void clear() noexcept
Removes all values from the conainer,.
Definition: managed_linear_set.hpp:343
ext::vector< T, Alloc >::const_reverse_iterator const_reverse_iterator
The type of const reverse iterator over values in the set. It is the same as the underling vector's c...
Definition: managed_linear_set.hpp:111
typename std::vector< T, Alloc >::const_iterator const_iterator
The type of constant values iterator.
Definition: vector.hpp:67
typename std::vector< T, Alloc >::const_reverse_iterator const_reverse_iterator
The type of constant reverse values iterator.
Definition: vector.hpp:79
p second
Definition: ToRegExpAlgebraic.h:126
Definition: sigHandler.cpp:20
callback_iterator< T > make_callback_iterator(T callback)
Definition: iterator.hpp:993
int callback(struct dl_phdr_info *info, size_t, void *data)
Definition: simpleStacktrace.cpp:25
void set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator1 result1, OutputIterator2 result2, Compare comp)
Constructs sorted ranges beginning in the location pointed by result1 and result2 with the set differ...
Definition: algorithm.hpp:93
iterator_range< Iter > make_iterator_range(Iter begin, Iter end)
Helper to create iterator_range from two iterators.
Definition: range.hpp:235
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79
std::ostream & operator<<(ext::reference_wrapper< std::ostream > &os, std::ostream &(*const func)(std::ostream &))
Overloaded function allowing same operations on wrapped output stream as on the actual output stream,...
Definition: GlobalData.cpp:33
Definition: FordFulkerson.hpp:16
void swap(ext::managed_linear_set< T, Compare, Alloc > &x, ext::managed_linear_set< T, Compare, Alloc > &y)
Specialisation of swap for linear set.
Definition: managed_linear_set.hpp:864