ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ArrayQueue.h

The QUEUE of the book realized with a circular vector of \( m \) places, the place 0 following the place \( m - 1 \). More...

Files

file  ADS/queue/ArrayQueue.h
 The QUEUE of the book [see ADT.h] realized with a circular vector of \( m \) places, the place 0 following the place \( m - 1 \): the queue is in \( n \) consecutive places from the one of its front, \( h \), so that its back is in the place \( ( h + n - 1 ) \bmod m \) and every operation takes \( O( 1 ) \) time; the modulo is a comparison and a subtraction, since the sum is below \( 2 m \), instead of a division.

Classes

class  ADS::ArrayQueue< T >
 a QUEUE realized with a circular vector of a given capacity More...

Detailed description

The QUEUE of the book realized with a circular vector of \( m \) places, the place 0 following the place \( m - 1 \).

The definitions, the invariants and the costs of the area are in Theory of queues.