Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/ptr_container/doc/guidelines.html @ 14

Last change on this file since 14 was 12, checked in by landauf, 17 years ago

added boost

File size: 2.8 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
7<title>Boost Pointer Container Library</title>
8<link rel="stylesheet" href="default.css" type="text/css" />
9</head>
10<body>
11<div class="document" id="boost-pointer-container-library">
12<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
13<h2 class="subtitle" id="usage-guidelines">Usage Guidelines</h2>
14<p>The recommended usage pattern of the container classes are the same as the
15for normal standard containers.</p>
16<p><tt class="docutils literal"><span class="pre">ptr_vector</span></tt>, <tt class="docutils literal"><span class="pre">ptr_list</span></tt> and <tt class="docutils literal"><span class="pre">ptr_deque</span></tt> offer the programmer different
17complexity tradeoffs and should be used accordingly.  <tt class="docutils literal"><span class="pre">ptr_vector</span></tt> is the
18type of sequence that should be used by default.  <tt class="docutils literal"><span class="pre">ptr_list</span></tt> should be used
19when there are frequent insertions and deletions from the middle of the
20sequence and if the container is fairly large (eg.  more than 100
21elements).  <tt class="docutils literal"><span class="pre">ptr_deque</span></tt> is the data structure of choice when most insertions
22and deletions take place at the beginning or at the end of the sequence. 
23The special container <tt class="docutils literal"><span class="pre">ptr_array</span></tt> may be used when the size of the container is invariant
24and known at compile time.</p>
25<p>An associative container supports unique keys if it may contain at most
26one element for each key. Otherwise, it supports equivalent keys. 
27<tt class="docutils literal"><span class="pre">ptr_set</span></tt> and <tt class="docutils literal"><span class="pre">ptr_map</span></tt> support unique keys. 
28<tt class="docutils literal"><span class="pre">ptr_multiset</span></tt> and <tt class="docutils literal"><span class="pre">ptr_multimap</span></tt> 
29support equivalent keys.</p>
30<p><strong>Navigate:</strong></p>
31<ul class="simple">
32<li><a class="reference" href="ptr_container.html">home</a></li>
33<li><a class="reference" href="reference.html">reference</a></li>
34</ul>
35<table class="docutils field-list" frame="void" rules="none">
36<col class="field-name" />
37<col class="field-body" />
38<tbody valign="top">
39<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
40</tr>
41</tbody>
42</table>
43</div>
44</body>
45</html>
Note: See TracBrowser for help on using the repository browser.