mirror of
https://github.com/boostorg/mpl.git
synced 2026-01-28 01:42:18 +01:00
58 lines
2.8 KiB
HTML
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> Expression </th><th> Expression type </th></tr>
|
|
<tr><td><code>has_key<s,k>::type</code></td><td>A model of boolean <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
|
|
<tr><td><code>count<s,k>::type</code></td><td>A model of <a href="./Integral_Constant.html">Integral Constant</a> </td></tr>
|
|
<tr><td><code>order<s,k>::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<s,k>::type</code></td><td>A type </td></tr>
|
|
<tr><td><code>at<s,k,default>::type</code></td><td>A type </td></tr>
|
|
</table>
|
|
<p>
|
|
<h3>Expression semantics</h3>
|
|
<p>
|
|
<table border="1">
|
|
<tr><th> Expression </th><th> Complexity </th><th> Precondition </th><th> Semantics </th><th> Postcondition </th></tr>
|
|
<tr><td><code>has_key<s,k>::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
|
|
<tr><td><code>count<s,k>::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
|
|
<tr><td><code>order<s,k>::type</code></td><td>Amortized constant time</td><td></td><td></td><td></td></tr>
|
|
<tr><td><code>at<s,k>::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> |