|
ADS
Algorithms and Data Structures
|
Algorithms that use a QUEUE [see ADT.h] only through its operations, beyond the book: More...
#include "ADS/ADT.h"#include "ADS/Contract.h"#include "ADS/queue/LinkedQueue.h"#include <vector>#include "ADS/queue/impl/QueueAlgorithms.tpp"Go to the source code of this file.
Namespaces | |
| namespace | ADS |
Functions | |
| template<Queue Q> | |
| void | ADS::extractPositive (Q &q, Q &out) |
| moves the positive items of \( q \), in their order, to the back of out, leaving \( q \) empty | |
| template<Queue Q> | |
| void | ADS::copyPositive (Q &q, Q &out) |
| copies the positive items of \( q \), in their order, to the back of out, leaving \( q \) as it was | |
Algorithms that use a QUEUE [see ADT.h] only through its operations, beyond the book:
The contracts [see Contract.h]: the two queues are distinct objects, and copyPositive() ensures that \( q \) is left as it was (an audit). The algorithms are defined in QueueAlgorithms.tpp.