| | | | | |

Deque Implementation Plan

  • Circular Array
    • Protected array content_ of size contentSize_
    • Maintain illusion: content_[contentSize_] == content_[0]
  • Relative Indexing
    • Protected unsigned integers beg_, end_
    • Element position is relative to beg_
    • Front element is content_[beg_]
    • Back element is content_[end_ - 1]
    • Size is end_ - beg_ (modulo contentSize_)
  • Class Bracket Operator
    • Modelled on Vector
    • Distinguished from Deque Iterator bracket operator

| | Top of Page | 1. Positional Containers - 22 of 23