Files
mpl/doc/ref/Associative_Sequence.html
Aleksey Gurtovoy 43af4b3bea update reference docs
[SVN r20792]
2003-11-12 07:55:12 +00:00

58 lines
2.8 KiB
HTML

<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::Associative Sequence</title>
<link rel="stylesheet" href="./mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="./Table_of_Contents.html"><img src="./mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>Associative Sequence</h1><h3>Description</h3>
<p>
An Associative Sequence is a <a href="./Sequence.html">Sequence</a> which allows efficient retrieval of elements based on keys. For some of associative sequences such as <code>set</code> it is guaranteed that no two elements have the same key. Others, such as <code>multiset</code>, allow multiple elements with the same key.
<p>
<h3>Refinement of</h3>
<p>
<a href="./Sequence.html">Sequence</a>
<p>
<h3>Valid expressions</h3>
<p>
In addition to <a href="./Sequence.html">Sequence</a>'s expressions the following expressions are valid.
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>has_key&lt;s,k&gt;::type</code></td><td>A model of boolean <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
<tr><td><code>count&lt;s,k&gt;::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
<tr><td><code>order&lt;s,k&gt;::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> or <code>void_</code> </td></tr>
<tr><td><code>at&lt;s,k&gt;::type</code></td><td>A type </td></tr>
<tr><td><code>at&lt;s,k,default&gt;::type</code></td><td>A type </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Complexity&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition &nbsp;</th></tr>
<tr><td><code>has_key&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>count&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>order&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
<tr><td><code>at&lt;s,k&gt;::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
</table>
<p>
<p>
<h3>Invariants</h3>
<p>
For any associative sequence <code>s</code> the following invariants always hold:
<ul>
<li>TODO
</ul>
<p>
<h3>Models</h3>
<p>
<ul>
<li><code>set</code>
<li><code>map</code>
<li><code>set_c</code>
</ul>
<p>
<h3>Notes</h3>
<p>
<h3>See also</h3>
<p>
<a href="./Sequences.html">Sequences</a>, <a href="./Forward_Sequence.html">Forward Sequence</a>, <a href="./Extensible_Associative_Sequence.html">Extensible Associative Sequence</a>,
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited October 25, 2003 7:40 am</body></html>