2010-04-07 23:40:53 +00:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=US-ASCII" >
< title > iota</ title >
2010-07-13 20:31:40 +00:00
< link rel = "stylesheet" href = "../../../../../../../../doc/src/boostbook.css" type = "text/css" >
< meta name = "generator" content = "DocBook XSL Stylesheets V1.75.2" >
2010-04-07 23:40:53 +00:00
< link rel = "home" href = "../../../../index.html" title = "Chapter 1. Range 2.0" >
2010-04-28 16:09:03 +00:00
< link rel = "up" href = "../new.html" title = "New algorithms" >
2010-04-07 23:40:53 +00:00
< link rel = "prev" href = "insert.html" title = "insert" >
2010-04-28 16:09:03 +00:00
< link rel = "next" href = "is_sorted.html" title = "is_sorted" >
2010-04-07 23:40:53 +00:00
</ head >
< body bgcolor = "white" text = "black" link = "#0000FF" vlink = "#840084" alink = "#0000FF" >
< table cellpadding = "2" width = "100%" >< tr >
< td valign = "top" >< img alt = "Boost C++ Libraries" width = "277" height = "86" src = "../../../../../../../../boost.png" ></ td >
< td align = "center" >< a href = "../../../../../../../../index.html" > Home</ a ></ td >
2010-07-13 20:31:40 +00:00
< td align = "center" >< a href = "../../../../../../../../libs/libraries.htm" > Libraries</ a ></ td >
2010-04-07 23:40:53 +00:00
< td align = "center" >< a href = "http://www.boost.org/users/people.html" > People</ a ></ td >
< td align = "center" >< a href = "http://www.boost.org/users/faq.html" > FAQ</ a ></ td >
< td align = "center" >< a href = "../../../../../../../../more/index.htm" > More</ a ></ td >
</ tr ></ table >
< hr >
< div class = "spirit-nav" >
2010-07-13 20:31:40 +00:00
< a accesskey = "p" href = "insert.html" >< img src = "../../../../../../../../doc/src/images/prev.png" alt = "Prev" ></ a >< a accesskey = "u" href = "../new.html" >< img src = "../../../../../../../../doc/src/images/up.png" alt = "Up" ></ a >< a accesskey = "h" href = "../../../../index.html" >< img src = "../../../../../../../../doc/src/images/home.png" alt = "Home" ></ a >< a accesskey = "n" href = "is_sorted.html" >< img src = "../../../../../../../../doc/src/images/next.png" alt = "Next" ></ a >
2010-04-07 23:40:53 +00:00
</ div >
2012-12-13 07:01:39 +00:00
< div class = "section range_reference_algorithms_new_iota" >
2010-04-07 23:40:53 +00:00
< div class = "titlepage" >< div >< div >< h5 class = "title" >
2010-12-22 22:31:33 +00:00
< a name = "range.reference.algorithms.new.iota" ></ a >< a class = "link" href = "iota.html" title = "iota" > iota</ a >
2010-04-07 23:40:53 +00:00
</ h5 ></ div ></ div ></ div >
2012-12-13 07:01:39 +00:00
< h6 >
< a name = "range.reference.algorithms.new.iota.h0" ></ a >
< span >< a name = "range.reference.algorithms.new.iota.prototype" ></ a ></ span >< a class = "link" href = "iota.html#range.reference.algorithms.new.iota.prototype" > Prototype</ a >
2010-04-07 23:40:53 +00:00
</ h6 >
< p >
</ p >
2010-04-11 22:05:02 +00:00
< pre class = "programlisting" >< span class = "keyword" > template</ span >< span class = "special" > < </ span >< span class = "keyword" > class</ span > < span class = "identifier" > ForwardRange</ span >< span class = "special" > ,</ span > < span class = "keyword" > class</ span > < span class = "identifier" > Value</ span >< span class = "special" > > </ span >
< span class = "identifier" > ForwardRange</ span >< span class = "special" > & </ span > < span class = "identifier" > iota</ span >< span class = "special" > (</ span >< span class = "identifier" > ForwardRange</ span >< span class = "special" > & </ span > < span class = "identifier" > rng</ span >< span class = "special" > ,</ span > < span class = "identifier" > Value</ span > < span class = "identifier" > x</ span >< span class = "special" > );</ span >
2010-04-07 23:40:53 +00:00
</ pre >
< p >
</ p >
2012-12-13 07:01:39 +00:00
< h6 >
< a name = "range.reference.algorithms.new.iota.h1" ></ a >
< span >< a name = "range.reference.algorithms.new.iota.description" ></ a ></ span >< a class = "link" href = "iota.html#range.reference.algorithms.new.iota.description" > Description</ a >
2010-04-07 23:40:53 +00:00
</ h6 >
< p >
< code class = "computeroutput" >< span class = "identifier" > iota</ span ></ code > traverses forward
through < code class = "computeroutput" >< span class = "identifier" > rng</ span ></ code > , each element
< code class = "computeroutput" >< span class = "identifier" > y</ span ></ code > in < code class = "computeroutput" >< span class = "identifier" > rng</ span ></ code >
is assigned a value equivalent to < code class = "computeroutput" >< span class = "identifier" > x</ span >
< span class = "special" > +</ span > < span class = "identifier" > boost</ span >< span class = "special" > ::</ span >< span class = "identifier" > distance</ span >< span class = "special" > (</ span >< span class = "identifier" > boost</ span >< span class = "special" > ::</ span >< span class = "identifier" > begin</ span >< span class = "special" > (</ span >< span class = "identifier" > rng</ span >< span class = "special" > ),</ span > < span class = "identifier" > it</ span >< span class = "special" > )</ span ></ code >
</ p >
2012-12-13 07:01:39 +00:00
< h6 >
< a name = "range.reference.algorithms.new.iota.h2" ></ a >
< span >< a name = "range.reference.algorithms.new.iota.definition" ></ a ></ span >< a class = "link" href = "iota.html#range.reference.algorithms.new.iota.definition" > Definition</ a >
2010-04-07 23:40:53 +00:00
</ h6 >
< p >
Defined in the header file < code class = "computeroutput" >< span class = "identifier" > boost</ span >< span class = "special" > /</ span >< span class = "identifier" > range</ span >< span class = "special" > /</ span >< span class = "identifier" > algorithm_ext</ span >< span class = "special" > /</ span >< span class = "identifier" > iota</ span >< span class = "special" > .</ span >< span class = "identifier" > hpp</ span ></ code >
</ p >
2012-12-13 07:01:39 +00:00
< h6 >
< a name = "range.reference.algorithms.new.iota.h3" ></ a >
< span >< a name = "range.reference.algorithms.new.iota.requirements" ></ a ></ span >< a class = "link" href = "iota.html#range.reference.algorithms.new.iota.requirements" > Requirements</ a >
2010-04-07 23:40:53 +00:00
</ h6 >
< div class = "orderedlist" >< ol class = "orderedlist" type = "1" >
< li class = "listitem" >
2010-07-13 20:31:40 +00:00
< code class = "computeroutput" >< span class = "identifier" > ForwardRange</ span ></ code > is a
model of the < a class = "link" href = "../../../concepts/forward_range.html" title = "Forward Range" > Forward
Range</ a > Concept.
</ li >
2010-04-07 23:40:53 +00:00
< li class = "listitem" >
2010-07-13 20:31:40 +00:00
< code class = "computeroutput" >< span class = "identifier" > Value</ span ></ code > is a model
of the < code class = "computeroutput" >< span class = "identifier" > Incrementable</ span ></ code >
Concept.
</ li >
2010-04-07 23:40:53 +00:00
</ ol ></ div >
2012-12-13 07:01:39 +00:00
< h6 >
< a name = "range.reference.algorithms.new.iota.h4" ></ a >
< span >< a name = "range.reference.algorithms.new.iota.complexity" ></ a ></ span >< a class = "link" href = "iota.html#range.reference.algorithms.new.iota.complexity" > Complexity</ a >
2010-04-07 23:40:53 +00:00
</ h6 >
< p >
Linear. Exactly < code class = "computeroutput" >< span class = "identifier" > distance</ span >< span class = "special" > (</ span >< span class = "identifier" > rng</ span >< span class = "special" > )</ span ></ code > assignments into < code class = "computeroutput" >< span class = "identifier" > rng</ span ></ code > .
</ p >
</ div >
< table xmlns:rev = "http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width = "100%" >< tr >
< td align = "left" ></ td >
2012-12-13 07:01:39 +00:00
< td align = "right" >< div class = "copyright-footer" > Copyright © 2003-2010 Thorsten Ottosen,
Neil Groves< p >
2010-04-07 23:40:53 +00:00
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at < a href = "http://www.boost.org/LICENSE_1_0.txt" target = "_top" > http://www.boost.org/LICENSE_1_0.txt</ a > )
</ p >
</ div ></ td >
</ tr ></ table >
< hr >
< div class = "spirit-nav" >
2010-07-13 20:31:40 +00:00
< a accesskey = "p" href = "insert.html" >< img src = "../../../../../../../../doc/src/images/prev.png" alt = "Prev" ></ a >< a accesskey = "u" href = "../new.html" >< img src = "../../../../../../../../doc/src/images/up.png" alt = "Up" ></ a >< a accesskey = "h" href = "../../../../index.html" >< img src = "../../../../../../../../doc/src/images/home.png" alt = "Home" ></ a >< a accesskey = "n" href = "is_sorted.html" >< img src = "../../../../../../../../doc/src/images/next.png" alt = "Next" ></ a >
2010-04-07 23:40:53 +00:00
</ div >
</ body >
</ html >