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
- H. M. Deitel, P. J. Deitel. C++: How to program. Prentice Hall, 3rd edition, 2001.
- P. J. Plauger, A. A. Stepanov, M. Lee, D. Musser. The C++ standard template library. Prentice Hall, 2001.
- Scott Meyers. Effective STL, Adison-Wesley, 2001.
Conten
Lectures (32hours)
- Parameterized functions and classes (4 hours)
- Template concept. Parameterized functions and classes. Implementation of parameterized list with iterator in C++
- STL library concepts system (4 hours).
- Concept, concept model, concept development. Containers, iterators, algorithm concepts.
- Sequential containers. (3 hours)
- The concept of sequential containers: vector, dequeu, list
Examples of the use
- Adapted containers (3 hours)
- stack, queue, priority queue containers. Examples of the use
- Associative containers (2 hours)
- The concept of associative containers. Simple, pair, single, multiple and associative containers.
- Simple associative containers (3 hours)
- set, multiset containers Examples of the use
- Pair associative containers (3 hours)
- map, multimap containers. Examples of the use
- Functional objects and iterator adapters (2 hours)
- Functional objects and iterator adapters. Examples of the use
- Universal algorithms that store sequence (2 hours)
- for_each, count, find, mismatch, equal, search algorithms. Examples of the use
- Universal algorithms that change sequence (2 hours)
- copy, transform, replace, remove, fill, generate algorithms Examples of the use
- 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
- Numerical algorithms (2 hours)
- accumulate, inner_product, partial_sum, adjacent_difference algorithms. Examples of the use