1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>posvx</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../../index.html" title="Chapter 1. Boost.Numeric_Bindings">
<link rel="up" href="../driver_routines.html" title="Driver Routines">
<link rel="prev" href="posv.html" title="posv">
<link rel="next" href="ppsv.html" title="ppsv">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="posv.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../driver_routines.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="ppsv.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx"></a><a class="link" href="posvx.html" title="posvx">posvx</a>
</h5></div></div></div>
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.prototype"></a><h6>
<a name="id856713"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.prototype">Prototype</a>
</h6>
<p>
There is one prototype of <code class="computeroutput"><span class="identifier">posvx</span></code>
available, please see below.
</p>
<pre class="programlisting"><span class="identifier">posvx</span><span class="special">(</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="identifier">fact</span><span class="special">,</span> <span class="identifier">MatrixA</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">MatrixAF</span><span class="special">&</span> <span class="identifier">af</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&</span> <span class="identifier">equed</span><span class="special">,</span>
<span class="identifier">VectorS</span><span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">MatrixB</span><span class="special">&</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">MatrixX</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Scalar</span> <span class="special">>,</span> <span class="identifier">VectorFERR</span><span class="special">&</span> <span class="identifier">ferr</span><span class="special">,</span>
<span class="identifier">VectorBERR</span><span class="special">&</span> <span class="identifier">berr</span> <span class="special">);</span>
</pre>
<p>
</p>
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.description"></a><h6>
<a name="id856991"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.description">Description</a>
</h6>
<p>
<code class="computeroutput"><span class="identifier">posvx</span></code> (short for $FRIENDLY_NAME)
provides a C++ interface to LAPACK routines SPOSVX, DPOSVX, CPOSVX, and
ZPOSVX. <code class="computeroutput"><span class="identifier">posvx</span></code> uses the
Cholesky factorization A = U**H*U or A = L<span class="bold"><strong>L</strong></span>*H
to compute the solution to a complex system of linear equations A * X
= B, where A is an N-by-N Hermitian positive definite matrix and X and
B are N-by-NRHS matrices.
</p>
<p>
Error bounds on the solution and a condition estimate are also provided.
</p>
<p>
Description <code class="literal">=</code><code class="literal">=</code><code class="literal">=</code>==
</p>
<p>
The following steps are performed:
</p>
<p>
1. If FACT = 'E', real scaling factors are computed to equilibrate the
system: diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B Whether
or not the system will be equilibrated depends on the scaling of the
matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S)
and B by diag(S)*B.
</p>
<p>
2. If FACT = 'N' or 'E', the Cholesky decomposition is used to factor
the matrix A (after equilibration if FACT = 'E') as A = U<span class="bold"><strong>*H</strong></span>
U, if UPLO = 'U', or A = L * L**H, if UPLO = 'L', where U is an upper
triangular matrix and L is a lower triangular matrix.
</p>
<p>
3. If the leading i-by-i principal minor is not positive definite, then
the routine returns with INFO = i. Otherwise, the factored form of A
is used to estimate the condition number of the matrix A. If the reciprocal
of the condition number is less than machine precision, INFO = N+1 is
returned as a warning, but the routine still goes on to solve for X and
compute error bounds as described below.
</p>
<p>
4. The system of equations is solved for X using the factored form of
A.
</p>
<p>
5. Iterative refinement is applied to improve the computed solution matrix
and calculate error bounds and backward error estimates for it.
</p>
<p>
6. If equilibration was used, the matrix X is premultiplied by diag(S)
so that it solves the original system before equilibration.
</p>
<p>
The selection of the LAPACK routine is done during compile-time, and
is determined by the type of values contained in type <code class="computeroutput"><span class="identifier">MatrixA</span></code>.
The type of values is obtained through the <code class="computeroutput"><span class="identifier">value_type</span></code>
meta-function <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special"><</span><span class="identifier">MatrixA</span><span class="special">>::</span><span class="identifier">type</span></code>. The dispatching table below illustrates
to which specific routine the code path will be generated.
</p>
<div class="table">
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.dispatching_of_posvx"></a><p class="title"><b>Table 1.142. Dispatching of posvx</b></p>
<div class="table-contents"><table class="table" summary="Dispatching of posvx">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Value type of MatrixA
</p>
</th>
<th>
<p>
LAPACK routine
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="keyword">float</span></code>
</p>
</td>
<td>
<p>
SPOSVX
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="keyword">double</span></code>
</p>
</td>
<td>
<p>
DPOSVX
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">complex</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span></code>
</p>
</td>
<td>
<p>
CPOSVX
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">complex</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span></code>
</p>
</td>
<td>
<p>
ZPOSVX
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.definition"></a><h6>
<a name="id857416"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.definition">Definition</a>
</h6>
<p>
Defined in header <code class="computeroutput">boost/numeric/bindings/lapack/driver/posvx.hpp</code>.
</p>
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.parameters_or_requirements_on_types"></a><h6>
<a name="id857458"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.parameters_or_requirements_on_types">Parameters
or Requirements on Types</a>
</h6>
<div class="variablelist">
<p class="title"><b>Parameters</b></p>
<dl>
<dt><span class="term">MatrixA</span></dt>
<dd><p>
The definition of term 1
</p></dd>
<dt><span class="term">MatrixB</span></dt>
<dd><p>
The definition of term 2
</p></dd>
<dt><span class="term">MatrixC</span></dt>
<dd>
<p>
The definition of term 3.
</p>
<p>
Definitions may contain paragraphs.
</p>
</dd>
</dl>
</div>
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.complexity"></a><h6>
<a name="id857545"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.complexity">Complexity</a>
</h6>
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.example"></a><h6>
<a name="id857573"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.example">Example</a>
</h6>
<p>
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">bindings</span><span class="special">/</span><span class="identifier">lapack</span><span class="special">/</span><span class="identifier">driver</span><span class="special">/</span><span class="identifier">posvx</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bindings</span><span class="special">;</span>
<span class="identifier">lapack</span><span class="special">::</span><span class="identifier">posvx</span><span class="special">(</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">,</span> <span class="identifier">z</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
this will output
</p>
<p>
</p>
<pre class="programlisting"><span class="special">[</span><span class="number">5</span><span class="special">]</span> <span class="number">0</span> <span class="number">1</span> <span class="number">2</span> <span class="number">3</span> <span class="number">4</span> <span class="number">5</span>
</pre>
<p>
</p>
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.notes"></a><h6>
<a name="id857857"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.notes">Notes</a>
</h6>
<a name="boost_numeric_bindings.reference.lapack.driver_routines.posvx.see_also"></a><h6>
<a name="id857883"></a>
<a class="link" href="posvx.html#boost_numeric_bindings.reference.lapack.driver_routines.posvx.see_also">See
Also</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Originating Fortran source files <a href="http://www.netlib.org/lapack/single/sposvx.f" target="_top">sposvx.f</a>,
<a href="http://www.netlib.org/lapack/double/dposvx.f" target="_top">dposvx.f</a>,
<a href="http://www.netlib.org/lapack/complex/cposvx.f" target="_top">cposvx.f</a>,
and <a href="http://www.netlib.org/lapack/complex16/zposvx.f" target="_top">zposvx.f</a>
at Netlib.
</li></ul></div>
</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 © 2002 -2009 Rutger ter Borg, Krešimir Fresl, Thomas Klimpel,
Toon Knapen, Karl Meerbergen<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">
<a accesskey="p" href="posv.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../driver_routines.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="ppsv.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
|