Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Generic algorithm » ?

Definition 5.5 University Computer Science — Year 2 · Chapitre 5 — The Standard Library: Containers, Iterators and Algorithms

A generic algorithm of the standard library is a function template, declared in <algorithm> or <numeric>, that works on an iterator range rather than on a container, and requires of its iterators a category: std::find needs input iterators, std::sort random-access ones. Algorithms never add or remove elements of the container: they only read, write or reorder through the iterators.

Lire dans le chapitre →