Basics of Generic Programming

Lecturer: Armen Kostanyan
Classes: 1 lecture, 1 practical class per week

Short description

This course will introduce the system of concepts underlying STL library of C++ language (iterators, containers and algorithms) and its characteristics. We pay special attention to the solution of applied problems by using library opportunities.

Requirements

Basic knowledge: This course includes
  • Basic knowledge of C++ language
  • Basic knowledge of data structures (list, stack, queue, priority queue, binary search tree)
Homework: : Weekly homework

Assessment

  • 10% participation
  • 50% homework
  • 40% group projects

Textbooks

  1. H. M. Deitel, P. J. Deitel. C++: How to program. Prentice Hall, 3rd edition, 2001.
  2. P. J. Plauger, A. A. Stepanov, M. Lee, D. Musser. The C++ standard template library. Prentice Hall, 2001.
  3. Scott Meyers. Effective STL, Adison-Wesley, 2001.

    Conten
    Lectures (32hours)
    1. Parameterized functions and classes (4 hours)
      • Template concept. Parameterized functions and classes. Implementation of parameterized list with iterator in C++
    2. STL library concepts system (4 hours).
      • Concept, concept model, concept development. Containers, iterators, algorithm concepts.
    3. Sequential containers. (3 hours)
      • The concept of sequential containers: vector, dequeu, list Examples of the use
    4. Adapted containers (3 hours)
      • stack, queue, priority queue containers. Examples of the use
    5. Associative containers (2 hours)
      • The concept of associative containers. Simple, pair, single, multiple and associative containers.
    6. Simple associative containers (3 hours)
      • set, multiset containers Examples of the use
    7. Pair associative containers (3 hours)
      • map, multimap containers. Examples of the use
    8. Functional objects and iterator adapters (2 hours)
      • Functional objects and iterator adapters. Examples of the use
    9. Universal algorithms that store sequence (2 hours)
      • for_each, count, find, mismatch, equal, search algorithms. Examples of the use
    10. Universal algorithms that change sequence (2 hours)
      • copy, transform, replace, remove, fill, generate algorithms Examples of the use
    11. Universal algorithms related to sorting (2 hours)
      • sort, stable_sort, nth_element, binary_search, lower_bound, upper_bound, equal_range, merge, lexicographical_compare, next_permutation, prev_permutation algorithms Examples of the use
    12. Numerical algorithms (2 hours)
      • accumulate, inner_product, partial_sum, adjacent_difference algorithms. Examples of the use