| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|---|
| 2 | "http://www.w3.org/TR/html4/loose.dtd"> |
|---|
| 3 | <html> |
|---|
| 4 | <head> |
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
|---|
| 6 | <link rel="stylesheet" type="text/css" href="../../../../boost.css"> |
|---|
| 7 | <title>Headers Inclusion</title> |
|---|
| 8 | </head> |
|---|
| 9 | |
|---|
| 10 | <body lang="en"> |
|---|
| 11 | <h1>Headers Inclusion</h1> |
|---|
| 12 | |
|---|
| 13 | <p>The easiest way to access to the library is by including the main |
|---|
| 14 | header:</p> |
|---|
| 15 | <pre>#include <boost/numeric/interval.hpp></pre> |
|---|
| 16 | |
|---|
| 17 | <p>This header will include almost all the other headers (except the ones |
|---|
| 18 | listed as extensions). However, you may not want to access all the |
|---|
| 19 | functionalities of the library. So this page stands as a reminder for the |
|---|
| 20 | whole structure of the library. |
|---|
| 21 | <code><boost/numeric/interval.hpp></code> is the only header to be |
|---|
| 22 | located directly under <code>boost/numeric</code>; all the other headers are |
|---|
| 23 | located in the subdirectory <code>boost/numeric/interval</code>. And each |
|---|
| 24 | time this documentation will refer to <code>interval/something.hpp</code>, it |
|---|
| 25 | is <code><boost/numeric/interval/something.hpp></code>.</p> |
|---|
| 26 | |
|---|
| 27 | <p>Please also note that all the following headers are independent and can |
|---|
| 28 | easily be pre-compiled if necessary (for compilers which support pre-compiled |
|---|
| 29 | headers of course).</p> |
|---|
| 30 | |
|---|
| 31 | <h2>Function definitions</h2> |
|---|
| 32 | |
|---|
| 33 | <p>The following headers contain the definition of the <code>interval</code> |
|---|
| 34 | class and all the friendly functions and operators.</p> |
|---|
| 35 | |
|---|
| 36 | <h3><code>interval/interval.hpp</code></h3> |
|---|
| 37 | |
|---|
| 38 | <p>This header contains the definition and the declaration of the |
|---|
| 39 | <code>interval</code> class. However, this class is templated and the default |
|---|
| 40 | template parameters are not available by this header. In particular, this |
|---|
| 41 | header does not provide the default specialization of the |
|---|
| 42 | <code>interval</code> class for the floating-point types |
|---|
| 43 | (<code>interval<float></code>, <code>interval<double></code> and |
|---|
| 44 | <code>interval<long double></code>). So, unless you use your own |
|---|
| 45 | policies, this header is not really useful on its own.</p> |
|---|
| 46 | |
|---|
| 47 | <h3><code>interval/utility.hpp</code></h3> |
|---|
| 48 | |
|---|
| 49 | <p>In this header are all the functions that do not expect any arithmetic |
|---|
| 50 | property from the base number type. It only expects the bounds to be ordered; |
|---|
| 51 | but it should not surprise you since it is a requirement of the whole |
|---|
| 52 | library. You will find in this header the definitions of access and related |
|---|
| 53 | functions: <code>lower</code>, <code>upper</code>, |
|---|
| 54 | <code>checked_lower</code>, <code>checked_upper</code>, <code>median</code>, |
|---|
| 55 | <code>width</code>, <code>widen</code>. There are also the set-like |
|---|
| 56 | functions: <code>in,</code> <code>in_zero</code>, <code>empty</code>, |
|---|
| 57 | <code>subset</code>, <code>proper_subset</code>, <code>overlap</code>, |
|---|
| 58 | <code>singleton</code>, <code>equal</code>, <code>intersect</code>, |
|---|
| 59 | <code>hull</code>, <code>bisect</code>. Finally, <code>abs</code>, |
|---|
| 60 | <code>min</code> and <code>max</code> are defined.</p> |
|---|
| 61 | |
|---|
| 62 | <h3><code>interval/arith.hpp</code></h3> |
|---|
| 63 | |
|---|
| 64 | <p>Here are the binary operators <code>+</code>, <code>-</code>, |
|---|
| 65 | <code>*</code>, <code>/</code> and the unary operator <code>-</code>.</p> |
|---|
| 66 | |
|---|
| 67 | <h3><code>interval/arith2.hpp</code></h3> |
|---|
| 68 | |
|---|
| 69 | <p>This header defines <code>fmod</code>, <code>square</code>, |
|---|
| 70 | <code>sqrt</code> and <code>pow</code>.</p> |
|---|
| 71 | |
|---|
| 72 | <h3><code>interval/arith3.hpp</code></h3> |
|---|
| 73 | |
|---|
| 74 | <p>The third arithmetic header: it provides the functions <code>add</code>, |
|---|
| 75 | <code>sub</code>, <code>mul</code>, <code>div</code>. The type of their |
|---|
| 76 | arguments is the base number type.</p> |
|---|
| 77 | |
|---|
| 78 | <h3><code>interval/transc.hpp</code></h3> |
|---|
| 79 | |
|---|
| 80 | <p>It is the last of the headers with mathematical functions; it provides the |
|---|
| 81 | following functions: <code>cos</code>, <code>sin</code>, <code>tan</code>, |
|---|
| 82 | <code>acos</code>, <code>asin</code>, <code>atan</code>, <code>cosh</code>, |
|---|
| 83 | <code>sinh</code>, <code>tanh</code>, <code>acosh</code>, <code>asinh</code>, |
|---|
| 84 | <code>atanh</code>, <code>exp</code> and <code>log</code>.</p> |
|---|
| 85 | |
|---|
| 86 | <h2>Policies</h2> |
|---|
| 87 | |
|---|
| 88 | <p>The following headers define some policies. They may be needed if you use |
|---|
| 89 | the default policies.</p> |
|---|
| 90 | |
|---|
| 91 | <h3><code>interval/rounded_arith.hpp</code></h3> |
|---|
| 92 | |
|---|
| 93 | <p>This header defines the three provided rounding policies for the |
|---|
| 94 | arithmetic functions: <code>rounded_arith_std</code>, |
|---|
| 95 | <code>rounded_arith_opp</code>, <code>rounded_arith_exact</code>.</p> |
|---|
| 96 | |
|---|
| 97 | <h3><code>interval/rounded_transc.hpp</code></h3> |
|---|
| 98 | |
|---|
| 99 | <p>This header defines the three provided rounding policies for the |
|---|
| 100 | transcendental functions: <code>rounded_transc_std</code>, |
|---|
| 101 | <code>rounded_transc_opp</code>, <code>rounded_transc_exact</code>. It is |
|---|
| 102 | separated from <code>rounded_arith.hpp</code> since the transcendental part |
|---|
| 103 | of the rounding policy is probably less useful than the arithmetic part.</p> |
|---|
| 104 | |
|---|
| 105 | <h3><code>interval/hw_rounding.hpp</code></h3> |
|---|
| 106 | |
|---|
| 107 | <p>Here are full rounding policies for the basic floating-point types. The |
|---|
| 108 | policies are processor-dependent; and to allow the user code to be portable, |
|---|
| 109 | they only define the common subset of the hardware available functions, which |
|---|
| 110 | are the arithmetic functions of the rounding policy.</p> |
|---|
| 111 | |
|---|
| 112 | <h3><code>interval/checking.hpp</code></h3> |
|---|
| 113 | |
|---|
| 114 | <p>This header provides the predefined checking policies: |
|---|
| 115 | <code>checking_base</code>, <code>checking_no_empty</code>, |
|---|
| 116 | <code>checking_no_nan</code>, <code>checking_catch_nan</code>, |
|---|
| 117 | <code>checking_strict</code>.</p> |
|---|
| 118 | |
|---|
| 119 | <h3><code>interval/policies.hpp</code></h3> |
|---|
| 120 | |
|---|
| 121 | <p>Here are defined the helpers for manipulating policies. It contains |
|---|
| 122 | <code>policies</code> (and so is needed for using default policies), |
|---|
| 123 | <code>change_rounding</code>, <code>change_checking</code>, |
|---|
| 124 | <code>unprotect</code>, etc.</p> |
|---|
| 125 | |
|---|
| 126 | <h2>Comparisons</h2> |
|---|
| 127 | |
|---|
| 128 | <h3><code>interval/compare.hpp</code></h3> |
|---|
| 129 | |
|---|
| 130 | <p>This header includes all the following headers. They provide some |
|---|
| 131 | predefined comparison namespaces.</p> |
|---|
| 132 | |
|---|
| 133 | <h3><code>interval/compare/certain.hpp</code></h3> |
|---|
| 134 | |
|---|
| 135 | <p>Here is <code>compare::certain</code>.</p> |
|---|
| 136 | |
|---|
| 137 | <h3><code>interval/compare/possible.hpp</code></h3> |
|---|
| 138 | |
|---|
| 139 | <p>And here is its friend <code>compare::possible</code>.</p> |
|---|
| 140 | |
|---|
| 141 | <h3><code>interval/compare/explicit.hpp</code></h3> |
|---|
| 142 | |
|---|
| 143 | <p>The explicit comparison functions <code>cerlt</code>, <code>posge</code>, |
|---|
| 144 | etc are defined in this header.</p> |
|---|
| 145 | |
|---|
| 146 | <h3><code>interval/compare/lexicographic.hpp</code></h3> |
|---|
| 147 | |
|---|
| 148 | <p>This header provides <code>compare::lexicographic</code>.</p> |
|---|
| 149 | |
|---|
| 150 | <h3><code>interval/compare/set.hpp</code></h3> |
|---|
| 151 | |
|---|
| 152 | <p>This header provides <code>compare::set</code>.</p> |
|---|
| 153 | |
|---|
| 154 | <h2>Extensions</h2> |
|---|
| 155 | |
|---|
| 156 | <p>The following headers are not included by <code>interval.hpp</code> and |
|---|
| 157 | will usually provide not always desirable capabilities.</p> |
|---|
| 158 | |
|---|
| 159 | <h3><code>interval/io.hpp</code></h3> |
|---|
| 160 | |
|---|
| 161 | <p>Here are defined basic stream operators <code><<</code> and |
|---|
| 162 | <code>>></code>. They should only be used as a first approach and later |
|---|
| 163 | be replaced by a customized version.</p> |
|---|
| 164 | |
|---|
| 165 | <h3><code>interval/limits.hpp</code></h3> |
|---|
| 166 | |
|---|
| 167 | <p>A specialization of <code>std::numeric_limits</code> adapted to the |
|---|
| 168 | interval type.</p> |
|---|
| 169 | |
|---|
| 170 | <h3><code>interval/compare/tribool.hpp</code></h3> |
|---|
| 171 | |
|---|
| 172 | <p>This header provides a comparison namespace <code>compare::tribool</code> |
|---|
| 173 | especially adapted to a tristate boolean.</p> |
|---|
| 174 | |
|---|
| 175 | <h3><code>interval/ext/integer.hpp</code></h3> |
|---|
| 176 | |
|---|
| 177 | <p>This header provides mixed operations between intervals and integers. It |
|---|
| 178 | is done by converting the integer to the base number type. Because this |
|---|
| 179 | comparison is not always correct (for a big <code>int</code> may not be |
|---|
| 180 | exactly convertible to <code>float</code>), this header is not automatically |
|---|
| 181 | included and the user should ensure that this behavior is compatible with |
|---|
| 182 | what she wants to do (if it is only to multiply some intervals by 2, it |
|---|
| 183 | probably is a good thing to include this header).</p> |
|---|
| 184 | |
|---|
| 185 | <h3><code>interval/ext/x86_fast_rounding_control.hpp</code></h3> |
|---|
| 186 | |
|---|
| 187 | <p>This header defines a new rounding policy allowing to workaround the |
|---|
| 188 | precision problem of the x86 processors (and so speeding up the |
|---|
| 189 | computations). However, it only is a partial solution and it shouldn't be |
|---|
| 190 | used when there is a possibility of underflow or overflow.</p> |
|---|
| 191 | <hr> |
|---|
| 192 | |
|---|
| 193 | <p>Revised: 2003-04-22<br> |
|---|
| 194 | Copyright (c) Guillaume Melquiond, Sylvain Pion, Hervé Brönnimann, 2002. |
|---|
| 195 | Polytechnic University.<br> |
|---|
| 196 | Copyright (c) Guillaume Melquiond, 2003.</p> |
|---|
| 197 | </body> |
|---|
| 198 | </html> |
|---|