The Iterator Algorithms component contains parallel versions of many common algorithms that operate on ranges of iterators. It contains the same methods as the Array Algorithms component, but the methods operate on iterators.
Iterators are the most important innovation in generic libraries because they decouple algorithms from the data structures. These concepts make it possible to reuse existing algorithms with new data structures and existing data structures with new algorithms. Iterators, along with function objects, allow even a simple algorithm to be reused in very diverse contexts.
You can use PTL iterator algorithms with PTL Containers and Persistent Containers components. You can also design your own containers that work with PTL iterator algorithms by implementing the Iterator interfaces from the Progeneric.PTL.Interfaces component. The Interfaces component is bundled with the Iterator Algorithms component, and you can view its online documentation for more information.
Algorithms are grouped into the following static classes based on their actions on data structures. Therefore, it is easy to use and memorize them.
Algorithms operate on a linear range of elements [first, last). This notation comes from mathematics. It is written in this asymmetric form to emphasize that [first, last) is a half-open interval that includes first but not last. A range [first, last) is valid if all the iterators in [first, last) are dereferenceable (have an associated value) and if last is reachable from first.