![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Sorted priority queue iterator. More...
#include <agrum/base/core/sortedPriorityQueue.h>
Inherits SharedAVLTreeReverseIterator< Val, SortedPriorityQueue< Val, int, std::less< int > >::TreeCmp >.
Public Types | |
| using | iterator_category = std::bidirectional_iterator_tag |
| Types for STL compliance. | |
| using | value_type = Val |
| Types for STL compliance. | |
| using | reference = value_type& |
| Types for STL compliance. | |
| using | const_reference = const value_type& |
| Types for STL compliance. | |
| using | pointer = value_type* |
| Types for STL compliance. | |
| using | const_pointer = const value_type* |
| Types for STL compliance. | |
| using | TreeCmp = typename SortedPriorityQueue< Val, Priority, Cmp >::TreeCmp |
| Types for STL compliance. | |
Public Member Functions | |
Constructors / Destructors | |
| SortedPriorityQueueIterator (const SortedPriorityQueue< Val, Priority, Cmp > &queue, const bool begin=true) noexcept | |
| constructor for begin iterators | |
| SortedPriorityQueueIterator (const SortedPriorityQueueIterator< Val, Priority, Cmp > &from) noexcept | |
| copy constructor | |
| SortedPriorityQueueIterator (SortedPriorityQueueIterator< Val, Priority, Cmp > &&from) noexcept | |
| move constructor | |
| ~SortedPriorityQueueIterator () noexcept | |
| destructor | |
Operators | |
| SortedPriorityQueueIterator< Val, Priority, Cmp > & | operator= (const SortedPriorityQueueIterator< Val, Priority, Cmp > &from) noexcept |
| copy operator | |
| SortedPriorityQueueIterator< Val, Priority, Cmp > & | operator= (SortedPriorityQueueIterator< Val, Priority, Cmp > &&from) noexcept |
| move operator | |
| bool | operator== (const SortedPriorityQueueIterator< Val, Priority, Cmp > &from) const |
| indicates whether two iterator point to the same element | |
| bool | operator!= (const SortedPriorityQueueIterator< Val, Priority, Cmp > &from) const |
| indicates whether two iterator point to different element | |
| SortedPriorityQueueIterator< Val, Priority, Cmp > & | operator++ () noexcept |
| move to the next element in the queue | |
| SortedPriorityQueueIterator< Val, Priority, Cmp > & | operator+= (const Size k) noexcept |
| move to the next k element | |
| SortedPriorityQueueIterator< Val, Priority, Cmp > & | operator-- () noexcept |
| move to the preceding element in the queue | |
| SortedPriorityQueueIterator< Val, Priority, Cmp > & | operator-= (const Size k) noexcept |
| move to the preceding k element | |
| const_reference | operator* () const |
| returns the value pointed to by the iterator | |
| const_pointer | operator-> () const |
| returns a pointer on the value pointed to by the iterator | |
Public Attributes | |
| friend | SortedPriorityQueue< Val, Priority, Cmp > |
| allow sorted priority queues to access the content of the iterators | |
Sorted priority queue iterator.
| Val | The type of the elements stored into the queue. |
| Priority | The type of the priorities assigned to the elements. |
| Cmp | The function used for sorting the priorities. |
Definition at line 554 of file sortedPriorityQueue.h.
| using gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::const_pointer = const value_type* |
Types for STL compliance.
Definition at line 566 of file sortedPriorityQueue.h.
| using gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::const_reference = const value_type& |
Types for STL compliance.
Definition at line 564 of file sortedPriorityQueue.h.
| using gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::iterator_category = std::bidirectional_iterator_tag |
Types for STL compliance.
Definition at line 561 of file sortedPriorityQueue.h.
| using gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::pointer = value_type* |
Types for STL compliance.
Definition at line 565 of file sortedPriorityQueue.h.
| using gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::reference = value_type& |
Types for STL compliance.
Definition at line 563 of file sortedPriorityQueue.h.
| using gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::TreeCmp = typename SortedPriorityQueue< Val, Priority, Cmp >::TreeCmp |
Types for STL compliance.
Definition at line 567 of file sortedPriorityQueue.h.
| using gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::value_type = Val |
Types for STL compliance.
Definition at line 562 of file sortedPriorityQueue.h.
|
explicitnoexcept |
constructor for begin iterators
| queue | the sorted priority queue which parses the iterator |
| begin | if true, the iterator points to the highest value in the queue, else it points to the lowest value |
|
noexcept |
copy constructor
|
noexcept |
move constructor
|
noexcept |
destructor
| bool gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::operator!= | ( | const SortedPriorityQueueIterator< Val, Priority, Cmp > & | from | ) | const |
indicates whether two iterator point to different element
| const_reference gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::operator* | ( | ) | const |
returns the value pointed to by the iterator
| NotFound | is raised if the iterator points to nothing |
|
noexcept |
move to the next element in the queue
|
noexcept |
move to the next k element
|
noexcept |
move to the preceding element in the queue
|
noexcept |
move to the preceding k element
| const_pointer gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::operator-> | ( | ) | const |
returns a pointer on the value pointed to by the iterator
|
noexcept |
copy operator
|
noexcept |
move operator
| bool gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::operator== | ( | const SortedPriorityQueueIterator< Val, Priority, Cmp > & | from | ) | const |
indicates whether two iterator point to the same element
| friend gum::SortedPriorityQueueIterator< Val, Priority, Cmp >::SortedPriorityQueue< Val, Priority, Cmp > |
allow sorted priority queues to access the content of the iterators
Definition at line 658 of file sortedPriorityQueue.h.