<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>SuperLU: SRC/sp_preorder.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.5 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> </div> <div class="contents"> <h1>SRC/sp_preorder.c File Reference</h1>Permute and performs functions on columns of orginal matrix. <a href="#_details">More...</a> <p> <code>#include "<a class="el" href="slu__ddefs_8h-source.html">slu_ddefs.h</a>"</code><br> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sp__preorder_8c.html#d3a9a45f02456022c7eba79e17e215bc">sp_preorder</a> (<a class="el" href="structsuperlu__options__t.html">superlu_options_t</a> *options, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *<a class="el" href="ilu__zdrop__row_8c.html#c900805a486cbb8489e3c176ed6e0d8e">A</a>, int *perm_c, int *etree, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *AC)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="sp__preorder_8c.html#c79059104ae6abf212c41986820d358c">check_perm</a> (char *what, int n, int *perm)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <hr><h2>Function Documentation</h2> <a class="anchor" name="c79059104ae6abf212c41986820d358c"></a><!-- doxytag: member="sp_preorder.c::check_perm" ref="c79059104ae6abf212c41986820d358c" args="(char *what, int n, int *perm)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int check_perm </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"> <em>what</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>n</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>perm</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="d3a9a45f02456022c7eba79e17e215bc"></a><!-- doxytag: member="sp_preorder.c::sp_preorder" ref="d3a9a45f02456022c7eba79e17e215bc" args="(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *etree, SuperMatrix *AC)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void sp_preorder </td> <td>(</td> <td class="paramtype"><a class="el" href="structsuperlu__options__t.html">superlu_options_t</a> * </td> <td class="paramname"> <em>options</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> * </td> <td class="paramname"> <em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>perm_c</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>etree</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> * </td> <td class="paramname"> <em>AC</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <pre> Purpose =======</pre><p> <pre> <a class="el" href="slu__util_8h.html#df9c573cbfb4520a5ea820702d27cfa5">sp_preorder()</a> permutes the columns of the original matrix. It performs the following steps:</pre><p> <pre> 1. Apply column permutation perm_c[] to A's column pointers to form AC;</pre><p> <pre> 2. If options->Fact = DOFACT, then (1) Compute column elimination tree etree[] of AC'AC; (2) Post order etree[] to get a postordered elimination tree etree[], and a postorder permutation post[]; (3) Apply post[] permutation to columns of AC; (4) Overwrite perm_c[] with the product perm_c * post.</pre><p> <pre> Arguments =========</pre><p> <pre> options (input) superlu_options_t* Specifies whether or not the elimination tree will be re-used. If options->Fact == DOFACT, this means first time factor A, etree is computed, postered, and output. Otherwise, re-factor A, etree is input, unchanged on exit.</pre><p> <pre> A (input) SuperMatrix* Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number of the linear equations is A->nrow. Currently, the type of A can be: Stype = NC or SLU_NCP; Mtype = SLU_GE. In the future, more general A may be handled.</pre><p> <pre> perm_c (input/output) int* Column permutation vector of size A->ncol, which defines the permutation matrix Pc; perm_c[i] = j means column i of A is in position j in A*Pc. If options->Fact == DOFACT, perm_c is both input and output. On output, it is changed according to a postorder of etree. Otherwise, perm_c is input.</pre><p> <pre> etree (input/output) int* Elimination tree of Pc'*A'*A*Pc, dimension A->ncol. If options->Fact == DOFACT, etree is an output argument, otherwise it is an input argument. Note: etree is a vector of parent pointers for a forest whose vertices are the integers 0 to A->ncol-1; etree[root]==A->ncol.</pre><p> <pre> AC (output) SuperMatrix* The resulting matrix after applied the column permutation perm_c[] to matrix A. The type of AC can be: Stype = SLU_NCP; Dtype = A->Dtype; Mtype = SLU_GE. </pre> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Thu Aug 25 13:43:50 2011 for SuperLU by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> </body> </html>