ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
QueueAlgorithms.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*------------------------- File QueueAlgorithms.h -------------------------*/
3/*--------------------------------------------------------------------------*/
27/*--------------------------------------------------------------------------*/
28/*----------------------------- DEFINITIONS --------------------------------*/
29/*--------------------------------------------------------------------------*/
30
31#ifndef __ADS_QueueAlgorithms
32 #define __ADS_QueueAlgorithms
33/* self-identification: #endif constant */
34
35/*--------------------------------------------------------------------------*/
36/*------------------------------ INCLUDES ----------------------------------*/
37/*--------------------------------------------------------------------------*/
38
39#include "ADS/ADT.h"
40#include "ADS/Contract.h"
42
43#include <vector>
44
45/*--------------------------------------------------------------------------*/
46/*--------------------------- NAMESPACE ------------------------------------*/
47/*--------------------------------------------------------------------------*/
48
49namespace ADS
50{
51
67template< Queue Q >
68void extractPositive( Q & q , Q & out );
69
91template< Queue Q >
92void copyPositive( Q & q , Q & out );
93
94/*--------------------------------------------------------------------------*/
95
96} // end( namespace ADS )
97
98/*--------------------------------------------------------------------------*/
99/*-------------------------- IMPLEMENTATION --------------------------------*/
100/*--------------------------------------------------------------------------*/
101
102#include "ADS/queue/impl/QueueAlgorithms.tpp"
103
104/*--------------------------------------------------------------------------*/
105
106#endif /* QueueAlgorithms.h included */
107
108/*--------------------------------------------------------------------------*/
109/*----------------------- End File QueueAlgorithms.h -----------------------*/
110/*--------------------------------------------------------------------------*/
The abstract data types of the book, as concepts of C++20: SEQUENCE, SET and DICTIONARY (chapter 3),...
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
A QUEUE [see ADT.h] realized as a singly linked list with a pointer to the first cell,...
void extractPositive(Q &q, Q &out)
moves the positive items of , in their order, to the back of out, leaving empty
void copyPositive(Q &q, Q &out)
copies the positive items of , in their order, to the back of out, leaving as it was
Definition ADT.h:96