2010-03-28 16:08:35 +00:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=US-ASCII" >
< title > includes< / title >
< link rel = "stylesheet" href = "../../../../../../../../doc/html/boostbook.css" type = "text/css" >
2010-04-08 19:09:34 +00:00
< meta name = "generator" content = "DocBook XSL Stylesheets V1.75.1" >
2010-03-28 16:08:35 +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 = "../set.html" title = "Set algorithms" >
< link rel = "prev" href = "../set.html" title = "Set algorithms" >
2010-03-28 16:08:35 +00:00
< link rel = "next" href = "set_union.html" title = "set_union" >
< / 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 >
< td align = "center" > < a href = "../../../../../../../libraries.htm" > Libraries< / a > < / td >
< 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-04-28 16:09:03 +00:00
< a accesskey = "p" href = "../set.html" > < img src = "../../../../../../../../doc/html/images/prev.png" alt = "Prev" > < / a > < a accesskey = "u" href = "../set.html" > < img src = "../../../../../../../../doc/html/images/up.png" alt = "Up" > < / a > < a accesskey = "h" href = "../../../../index.html" > < img src = "../../../../../../../../doc/html/images/home.png" alt = "Home" > < / a > < a accesskey = "n" href = "set_union.html" > < img src = "../../../../../../../../doc/html/images/next.png" alt = "Next" > < / a >
2010-03-28 16:08:35 +00:00
< / div >
< div class = "section" title = "includes" >
< div class = "titlepage" > < div > < div > < h5 class = "title" >
2010-04-28 16:09:03 +00:00
< a name = "range.reference.algorithms.set.includes" > < / a > < a class = "link" href = "includes.html" title = "includes" > includes< / a >
2010-03-28 16:08:35 +00:00
< / h5 > < / div > < / div > < / div >
2010-04-28 16:09:03 +00:00
< a name = "range.reference.algorithms.set.includes.prototype" > < / a > < h6 >
2010-04-28 19:27:44 +00:00
< a name = "id3136423" > < / a >
2010-04-28 16:09:03 +00:00
< a class = "link" href = "includes.html#range.reference.algorithms.set.includes.prototype" > Prototype< / a >
2010-03-28 16:08:35 +00:00
< / h6 >
< p >
< / p >
< pre class = "programlisting" > < span class = "keyword" > template< / span > < span class = "special" > < < / span > < span class = "keyword" > class< / span > < span class = "identifier" > SinglePassRange1< / span > < span class = "special" > ,< / span > < span class = "keyword" > class< / span > < span class = "identifier" > SinglePassRange2< / span > < span class = "special" > > < / span >
< span class = "keyword" > bool< / span > < span class = "identifier" > includes< / span > < span class = "special" > (< / span > < span class = "keyword" > const< / span > < span class = "identifier" > SinglePassRange1< / span > < span class = "special" > & < / span > < span class = "identifier" > rng1< / span > < span class = "special" > ,< / span > < span class = "keyword" > const< / span > < span class = "identifier" > SinglePassRange2< / span > < span class = "special" > & < / span > < span class = "identifier" > rng2< / span > < span class = "special" > );< / span >
< span class = "keyword" > template< / span > < span class = "special" > < < / span >
< span class = "keyword" > class< / span > < span class = "identifier" > SinglePassRange1< / span > < span class = "special" > ,< / span >
< span class = "keyword" > class< / span > < span class = "identifier" > SinglePassRange2< / span > < span class = "special" > ,< / span >
< span class = "keyword" > class< / span > < span class = "identifier" > BinaryPredicate< / span >
< span class = "special" > > < / span >
< span class = "keyword" > bool< / span > < span class = "identifier" > includes< / span > < span class = "special" > (< / span > < span class = "keyword" > const< / span > < span class = "identifier" > SinglePassRange1< / span > < span class = "special" > & < / span > < span class = "identifier" > rng1< / span > < span class = "special" > ,< / span > < span class = "keyword" > const< / span > < span class = "identifier" > SinglePassRange2< / span > < span class = "special" > & < / span > < span class = "identifier" > rng2< / span > < span class = "special" > ,< / span >
< span class = "identifier" > BinaryPredicate< / span > < span class = "identifier" > pred< / span > < span class = "special" > );< / span >
< / pre >
< p >
< / p >
2010-04-28 16:09:03 +00:00
< a name = "range.reference.algorithms.set.includes.description" > < / a > < h6 >
2010-04-28 19:27:44 +00:00
< a name = "id3136704" > < / a >
2010-04-28 16:09:03 +00:00
< a class = "link" href = "includes.html#range.reference.algorithms.set.includes.description" > Description< / a >
2010-03-28 16:08:35 +00:00
< / h6 >
< p >
< code class = "computeroutput" > < span class = "identifier" > includes< / span > < / code > returns < code class = "computeroutput" > < span class = "keyword" > true< / span > < / code > if and only if, for every element
in < code class = "computeroutput" > < span class = "identifier" > rng2< / span > < / code > , an equivalent
element is also present in < code class = "computeroutput" > < span class = "identifier" > rng1< / span > < / code > .
The ordering relationship is determined by using < code class = "computeroutput" > < span class = "keyword" > operator< / span > < span class = "special" > < < / span > < / code > in the non-predicate versions, and
by evaluating < code class = "computeroutput" > < span class = "identifier" > pred< / span > < / code > in
the predicate versions.
< / p >
2010-04-28 16:09:03 +00:00
< a name = "range.reference.algorithms.set.includes.definition" > < / a > < h6 >
2010-04-28 19:27:44 +00:00
< a name = "id3136803" > < / a >
2010-04-28 16:09:03 +00:00
< a class = "link" href = "includes.html#range.reference.algorithms.set.includes.definition" > Definition< / a >
2010-03-28 16:08:35 +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< / span > < span class = "special" > /< / span > < span class = "identifier" > set_algorithm< / span > < span class = "special" > .< / span > < span class = "identifier" > hpp< / span > < / code >
< / p >
2010-04-28 16:09:03 +00:00
< a name = "range.reference.algorithms.set.includes.requirements" > < / a > < h6 >
2010-04-28 19:27:44 +00:00
< a name = "id3136874" > < / a >
2010-04-28 16:09:03 +00:00
< a class = "link" href = "includes.html#range.reference.algorithms.set.includes.requirements" > Requirements< / a >
2010-03-28 16:08:35 +00:00
< / h6 >
< p >
< span class = "bold" > < strong > For the non-predicate versions:< / strong > < / span >
< / p >
< div class = "itemizedlist" > < ul class = "itemizedlist" type = "disc" >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange1< / span > < / code > is
a model of the < a class = "link" href = "../../../concepts/single_pass_range.html" title = "Single Pass Range" > Single
Pass Range< / a > Concept.
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange2< / span > < / code > is
a model of the < a class = "link" href = "../../../concepts/single_pass_range.html" title = "Single Pass Range" > Single
Pass Range< / a > Concept.
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange1< / span > < / code > and
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange2< / span > < / code > have
the same value type.
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange1< / span > < / code > 's
value type is a model of the < code class = "computeroutput" > < span class = "identifier" > LessThanComparableConcept< / span > < / code > .
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange2< / span > < / code > 's
value type is a model of the < code class = "computeroutput" > < span class = "identifier" > LessThanComparableConcept< / span > < / code > .
< / li >
< li class = "listitem" >
The ordering of objects of type < code class = "computeroutput" > < span class = "identifier" > SinglePassRange1< / span > < / code > 's
value type is a < span class = "bold" > < strong > < span class = "emphasis" > < em > strict weak ordering< / em > < / span > < / strong > < / span > ,
as defined in the < code class = "computeroutput" > < span class = "identifier" > LessThanComparableConcept< / span > < / code >
requirements.
< / li >
< li class = "listitem" >
The ordering of objects of type < code class = "computeroutput" > < span class = "identifier" > SinglePassRange2< / span > < / code > 's
value type is a < span class = "bold" > < strong > < span class = "emphasis" > < em > strict weak ordering< / em > < / span > < / strong > < / span > ,
as defined in the < code class = "computeroutput" > < span class = "identifier" > LessThanComparableConcept< / span > < / code >
requirements.
< / li >
< / ul > < / div >
< p >
< span class = "bold" > < strong > For the predicate versions:< / strong > < / span >
< / p >
< div class = "itemizedlist" > < ul class = "itemizedlist" type = "disc" >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange1< / span > < / code > is
a model of the < a class = "link" href = "../../../concepts/single_pass_range.html" title = "Single Pass Range" > Single
Pass Range< / a > Concept.
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange2< / span > < / code > is
a model of the < a class = "link" href = "../../../concepts/single_pass_range.html" title = "Single Pass Range" > Single
Pass Range< / a > Concept.
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange1< / span > < / code > and
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange2< / span > < / code > have
the same value type.
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > BinaryPredicate< / span > < / code > is
a model of the < code class = "computeroutput" > < span class = "identifier" > StrictWeakOrderingConcept< / span > < / code > .
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange1< / span > < / code > 's
value type is convertible to < code class = "computeroutput" > < span class = "identifier" > BinaryPredicate< / span > < / code > 's
first argument type.
< / li >
< li class = "listitem" >
< code class = "computeroutput" > < span class = "identifier" > SinglePassRange2< / span > < / code > 's
value type is convertible to < code class = "computeroutput" > < span class = "identifier" > BinaryPredicate< / span > < / code > 's
second argument types.
< / li >
< / ul > < / div >
2010-04-28 16:09:03 +00:00
< a name = "range.reference.algorithms.set.includes.precondition_" > < / a > < h6 >
2010-04-28 19:27:44 +00:00
< a name = "id3137265" > < / a >
2010-04-28 16:09:03 +00:00
< a class = "link" href = "includes.html#range.reference.algorithms.set.includes.precondition_" > Precondition:< / a >
2010-03-28 16:08:35 +00:00
< / h6 >
< p >
< span class = "bold" > < strong > For the non-predicate versions:< / strong > < / span >
< / p >
< p >
< code class = "computeroutput" > < span class = "identifier" > rng1< / span > < / code > and < code class = "computeroutput" > < span class = "identifier" > rng2< / span > < / code > are sorted in ascending order
according to < code class = "computeroutput" > < span class = "keyword" > operator< / span > < span class = "special" > < < / span > < / code > .
< / p >
< p >
< span class = "bold" > < strong > For the predicate versions:< / strong > < / span >
< / p >
< p >
< code class = "computeroutput" > < span class = "identifier" > rng1< / span > < / code > and < code class = "computeroutput" > < span class = "identifier" > rng2< / span > < / code > are sorted in ascending order
according to < code class = "computeroutput" > < span class = "identifier" > pred< / span > < / code > .
< / p >
2010-04-28 16:09:03 +00:00
< a name = "range.reference.algorithms.set.includes.complexity" > < / a > < h6 >
2010-04-28 19:27:44 +00:00
< a name = "id3137384" > < / a >
2010-04-28 16:09:03 +00:00
< a class = "link" href = "includes.html#range.reference.algorithms.set.includes.complexity" > Complexity< / a >
2010-03-28 16:08:35 +00:00
< / h6 >
< p >
Linear. < code class = "computeroutput" > < span class = "identifier" > O< / span > < span class = "special" > (< / span > < span class = "identifier" > N< / span > < span class = "special" > )< / span > < / code > ,
where < code class = "computeroutput" > < span class = "identifier" > N< / span > < / code > is < code class = "computeroutput" > < span class = "identifier" > distance< / span > < span class = "special" > (< / span > < span class = "identifier" > rng1< / span > < span class = "special" > )< / span > < span class = "special" > +< / span > < span class = "identifier" > distance< / span > < span class = "special" > (< / span > < span class = "identifier" > rng2< / span > < span class = "special" > )< / span > < / code > .
< / p >
< / div >
< table xmlns:rev = "http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width = "100%" > < tr >
< td align = "left" > < / td >
< td align = "right" > < div class = "copyright-footer" > Copyright © 2003 -2010 Thorsten Ottosen, Neil Groves< p >
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-04-28 16:09:03 +00:00
< a accesskey = "p" href = "../set.html" > < img src = "../../../../../../../../doc/html/images/prev.png" alt = "Prev" > < / a > < a accesskey = "u" href = "../set.html" > < img src = "../../../../../../../../doc/html/images/up.png" alt = "Up" > < / a > < a accesskey = "h" href = "../../../../index.html" > < img src = "../../../../../../../../doc/html/images/home.png" alt = "Home" > < / a > < a accesskey = "n" href = "set_union.html" > < img src = "../../../../../../../../doc/html/images/next.png" alt = "Next" > < / a >
2010-03-28 16:08:35 +00:00
< / div >
< / body >
< / html >