Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Iterator
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Classification=== ====Categories==== Iterators can be categorised according to their functionality. Here is a (non-exhaustive) list of iterator categories:<ref>{{cite web | url = http://www.phpro.org/tutorials/Introduction-to-SPL.html#2 | title = C++ Iteratoren: Iterator-Kategorien | author = Kevin Waterson | language = de | publisher = cppreference.com | access-date = 2012-08-09 }}</ref><ref>{{cite web | url = http://www.sgi.com/tech/stl/Iterators.html | title = Iterators: Concepts | author = Kevin Waterson | publisher = sgi | access-date = 2012-08-09 }}</ref> {| class="wikitable sortable" |- ! Category !! Languages |- | Bidirectional iterator || [[C++]], [[Rust (programming language)|Rust]]<ref>{{cite web |title=DoubleEndedIterator in std::iter - Rust |url=https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html |website=doc.rust-lang.org |access-date=11 May 2025}}</ref> |- | Forward iterator || C++ |- | Input iterator || C++ |- | Output iterator || C++ |- | Random access iterator || C++ |- | Trivial iterator || C++ (old [[Standard Template Library|STL]])<ref>{{cite web |url = https://stackoverflow.com/ |title = Types of iterator: Output vs. input vs. forward vs. random access iterator |author = larsmans |date = 2011-03-06 |publisher = stackoverflow |archive-url = https://web.archive.org/web/20120808230608/http://stackoverflow.com/ |archive-date = 2012-08-08 |access-date = 2012-08-09 |url-status = bot: unknown }}</ref> |} ====Types==== Different languages or libraries used with these languages define iterator types. Some of them are<ref>{{cite web | url = http://www.phpro.org/tutorials/Introduction-to-SPL.html#2 | title = Introduction to SPL: Introduction to Standard PHP Library (SPL) | author = Kevin Waterson | publisher = PHPRO.ORG | access-date = 2012-08-09 }}</ref> {| class="wikitable sortable" |- ! Type !! Languages |- | Array iterator || [[PHP]], R<ref>{{cite web|last=Collier|first=Andrew|title=Iterators in R|url=http://www.exegetic.biz/blog/2013/11/iterators-in-r/|access-date=16 November 2013|archive-date=18 October 2018|archive-url=https://web.archive.org/web/20181018084806/http://www.exegetic.biz/blog/2013/11/iterators-in-r/|url-status=dead}}</ref> |- | Caching iterator || PHP |- | Constant iterator || [[C++]],<ref>{{cite web | url = http://threadingbuildingblocks.org/docs/help/reference/containers_overview/concurrent_unordered_set_cls.htm | title = concurrent_unordered_set Template Class | publisher = Intel Threading Building Blocks for Open Source | quote = β’The iterator types iterator and const_iterator are of the forward iterator category | access-date = 2012-08-09 | archive-url = https://web.archive.org/web/20150501163238/http://threadingbuildingblocks.org/docs/help/reference/containers_overview/concurrent_unordered_set_cls.htm | archive-date = 2015-05-01 | url-status = dead }}</ref> PHP |- | Directory iterator || PHP, [[Python (programming language)|Python]] |- | Filter iterator || PHP, R |- | Limit iterator || PHP |- | List iterator || [[C Sharp (programming language)|C#]], [[Java (programming language)|Java]],<ref name=HFDPIterators /> R |- | Recursive array iterator || PHP |- | XML iterator || PHP |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)