Autrefois connue sous le nom de STL (Standard Template Library) – avant l' adjonction Inprise propose aux utilisateurs de C++ Builder sa propre bibliothèque
Previous PDF | Next PDF |
[PDF] Bibliothèque#standard#C++# - ISIMA
Pourquoi#uTliser#la#bibliothèque#standard#?# • C#standard# Conteneurs# et#itérateurs# • Algorithmes#et#foncteurs# 4 Contenu# STL#
[PDF] Chapitre 5 : programmation générique, bibliothèque standard (STL)
Permettent de programmer plusieurs fonctions d'un seul coup (“automatisation” de la surcharge de fonction) ; On crée une famille de fonction indexée par un
[PDF] La STL : Standard Template Library - LIRMM
STL – conteneurs 1 La STL : Standard Template Library Présentation générale La STL est une bibliothèque de classes et fonctions C++ que tout compilateur
[PDF] Les modèles de bibliothèques standard
- STL est un ensemble de classes qui, tout en collaborant, permettent de réaliser dans une catégorie de logiciels des conceptions réutilisables - Les STL : □
[PDF] Les conteneurs STL C++ - Free
Le C++ possède une bibliothèque standard (SL pour Standard Library) qui est STL (Standard Template Library : bibliothèque de modèles standard) En fait
[PDF] introduction à la STL
Une bibliothèque de fonctions entrées / La STL : Standard Template Library Containers Qui sont Prédéfinies (par exemple celles de la STL) Que l'on a
[PDF] La STL - imagecomputingnet
La STL STL = STandard Library Des conteneurs génériques Basées templates La bibliothèque standard Elle fait La STL est technique/complexe à utiliser
[PDF] STL précis & concis - Rackcdncom
STL précis concis Introduction Cet ouvrage décrit la bibliothèque standard des modèles de classes STL (Standard Template Library) STL est un sous-en-
[PDF] LA LIBRAIRIE STANDARD DU - Pages Persos Chezcom
Autrefois connue sous le nom de STL (Standard Template Library) – avant l' adjonction Inprise propose aux utilisateurs de C++ Builder sa propre bibliothèque
[PDF] Bibliothèque tkinter - Université de Toulon - Anciens Et Réunions
[PDF] Bibliothèque Tournante – LE RUCHER – 2006 - Bourron
[PDF] Bibliothèque universitaire - Des Bandes Dessinées
[PDF] Bibliothèque Universitaire - Bourg-en-Bresse - Campus de Bourg
[PDF] Bibliothèque universitaire - Université de Caen Normandie
[PDF] Bibliothèque Universitaire de l`Université de Reims Champagne
[PDF] Bibliothèque Universitaire de Montpellier - Gestion De Projet
[PDF] Bibliothèque universitaire Lyon 1 Lieu de
[PDF] Bibliothèque verte (10
[PDF] Bibliothèque Virtuelle ISDR-Mbandaka: Manuel de
[PDF] Bibliothèque – Bibliothek – Biblioteca – Library
[PDF] Bibliothèques - Anciens Et Réunions
[PDF] bibliothèques - Communauté de Communes du Saosnois
[PDF] bibliothèques de comités d`entreprise
![[PDF] LA LIBRAIRIE STANDARD DU - Pages Persos Chezcom [PDF] LA LIBRAIRIE STANDARD DU - Pages Persos Chezcom](https://pdfprof.com/Listes/15/22442-15stl.pdf.pdf.jpg)
The C++ Standard Template Library
Douglas C. Schmidt
Professor Department of EECS
d.schmidt@vanderbilt.edu Vanderbilt University www.dre.vanderbilt.edu/≂schmidt/ (615) 343-8197February 12, 2014
The C++ STLDouglas C. Schmidt
The C++ Standard Template Library
•What is STL? •Generic Programming: Why Use STL? •Overview of STL concepts & features -e.g., helper class & function templates, containers, iterators, generic algorithms, function objects, adaptors •A Complete STL Example •References for More Information on STLVanderbilt University 1The C++ STLDouglas C. Schmidt
What is STL?
The Standard Template Library provides a set of well structured genericC++ components that work together in aseamlessway. -Alexander Stepanov & Meng Lee,The Standard Template LibraryVanderbilt University
2The C++ STLDouglas C. Schmidt
What is STL (cont"d)?
•A collection of composable class & function templates -Helper class & function templates: operators, pair -Container & iterator class templates -Generic algorithms that operate overiterators -Function objects -Adaptors •Enables generic programming in C++ -Each generic algorithm can operate overany iterator for which the necessary operations are provided -Extensible: can support new algorithms, containers, iteratorsVanderbilt University 3The C++ STLDouglas C. Schmidt
Generic Programming: Why Use STL?
•Reuse: write less, do more" -STL hides complex, tedious & error prone details -The programmer can then focus on the problem at hand -Type-safeplug compatibility between STL components •Flexibility -Iterators decouple algorithms from containers -Unanticipated combinations easily supported •Efficiency -Templates avoid virtual function overhead -Strict attention to time complexity of algorithmsVanderbilt University 4The C++ STLDouglas C. Schmidt
STL Features: Containers, Iterators, & Algorithms
•Containers -Sequential:vector,deque,list -Associative:set,multiset,map,multimap -Adapters:stack,queue,priority queue •Iterators -Input, output, forward, bidirectional, & random access -Each container declares a trait for the type of iterator it provides •Generic Algorithms -Mutating, non-mutating, sorting, & numericVanderbilt University
5The C++ STLDouglas C. Schmidt
STL Container Overview
•STL containers areAbstract Data Types(ADTs) •All containers are parameterized by the type(s) they contain •Each container declares various traits -e.g.,iterator,const iterator,value type, etc. •Each container provides factory methods for creating iterators: -begin()/end()for traversing from front to back -rbegin()/rend()for traversing from back to frontVanderbilt University
6The C++ STLDouglas C. Schmidt
Types of STL Containers
•There are three types of containers - Sequential containersthat arrange the data they contain in a linear manner ?Element order has nothing to do with their value ?Similar to builtin arrays, but needn"t be stored contiguous - Associative containersthat maintain data in structures suitable for fast associative operations ?Supports efficient operations on elements using keys ordered byoperator< ?Implemented as balanced binary trees - Adaptersthat provide different ways to access sequential & associative containers ?e.g.,stack,queue, &priority queueVanderbilt University
7The C++ STLDouglas C. Schmidt
STL Vector Sequential Container
•Astd::vectoris a dynamic array that can grow & shrink at the end -e.g., it provides(prere)allocation,indexed storage,push back(), popback() •Supportsrandom access iterators•Similar tobut morepowerful thanbuilt-inC/C++ arrays#include
Vanderbilt University
8The C++ STLDouglas C. Schmidt
STL Deque Sequential Container
•Astd::deque(pronounceddeck") is a double-ended
queue •It adds efficient insertion &removal at thebeginning& endof the sequence via push front()& popfront()#includeVanderbilt University
9The C++ STLDouglas C. Schmidt
STL List Sequential Container
•Astd::listhas constant time insertion & deletion at anypoint in the sequence (not just at the beginning & end) -performancetrade-off: does notoffer arandom accessiterator•Implemented asdoubly-linked list#include #include
Vanderbilt University
10The C++ STLDouglas C. Schmidt
STL Associative Container: Set
•Anstd::setis an ordered collection of unique keys -e.g., a set ofstudent idnumbers#includeVanderbilt University
11The C++ STLDouglas C. Schmidt
STL Pair Helper Class
•This template group is thebasis for themap&set associative containers because it stores (potentially) heterogeneous pairs of data together•A pair binds a key (known asthe first element) with anassociated value (known as thesecond element)template