zutil_8c.html

来自「SuperLU is a general purpose library for」· HTML 代码 · 共 1,138 行 · 第 1/4 页

HTML
1,138
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>SuperLU: SRC/zutil.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.4.6 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>    <li id="current"><a href="files.html"><span>Files</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="files.html"><span>File&nbsp;List</span></a></li>    <li><a href="globals.html"><span>Globals</span></a></li>  </ul></div><h1>SRC/zutil.c File Reference</h1>Matrix utility functions. <a href="#_details">More...</a><p><code>#include &lt;math.h&gt;</code><br><code>#include &quot;<a class="el" href="slu__zdefs_8h-source.html">slu_zdefs.h</a>&quot;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#349f23fdb4e958cc6da8e890554b9868">zCreate_CompCol_Matrix</a> (<a class="el" href="structSuperMatrix.html">SuperMatrix</a> *A, int m, int n, int nnz, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *nzval, int *rowind, int *colptr, <a class="el" href="supermatrix_8h.html#9d2ddedeb2a3d92e950811c61d0b8796">Stype_t</a> stype, <a class="el" href="supermatrix_8h.html#7987cb2a28ec879b39a90e9e48e29190">Dtype_t</a> dtype, <a class="el" href="supermatrix_8h.html#5962adac634f3feebe487ad443802d60">Mtype_t</a> mtype)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Supernodal LU factor related.  <a href="#349f23fdb4e958cc6da8e890554b9868"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#bbb9f38872629121898fe588e5cf9c46">zCreate_CompRow_Matrix</a> (<a class="el" href="structSuperMatrix.html">SuperMatrix</a> *A, int m, int n, int nnz, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *nzval, int *colind, int *rowptr, <a class="el" href="supermatrix_8h.html#9d2ddedeb2a3d92e950811c61d0b8796">Stype_t</a> stype, <a class="el" href="supermatrix_8h.html#7987cb2a28ec879b39a90e9e48e29190">Dtype_t</a> dtype, <a class="el" href="supermatrix_8h.html#5962adac634f3feebe487ad443802d60">Mtype_t</a> mtype)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#6d326511607c3cb8c0b654b675bd3700">zCopy_CompCol_Matrix</a> (<a class="el" href="structSuperMatrix.html">SuperMatrix</a> *A, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *B)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy matrix A into matrix B.  <a href="#6d326511607c3cb8c0b654b675bd3700"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#8316b5e4832ca200a14d14f5ed164695">zCreate_Dense_Matrix</a> (<a class="el" href="structSuperMatrix.html">SuperMatrix</a> *X, int m, int n, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *x, int ldx, <a class="el" href="supermatrix_8h.html#9d2ddedeb2a3d92e950811c61d0b8796">Stype_t</a> stype, <a class="el" href="supermatrix_8h.html#7987cb2a28ec879b39a90e9e48e29190">Dtype_t</a> dtype, <a class="el" href="supermatrix_8h.html#5962adac634f3feebe487ad443802d60">Mtype_t</a> mtype)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#6632ad6334d30a38c9e8b026a3983b65">zCopy_Dense_Matrix</a> (int M, int N, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *X, int ldx, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *Y, int ldy)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copies a two-dimensional matrix X to another matrix Y.  <a href="#6632ad6334d30a38c9e8b026a3983b65"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#43150b5d7a29eebba2f8de5c2a35d645">zCreate_SuperNode_Matrix</a> (<a class="el" href="structSuperMatrix.html">SuperMatrix</a> *L, int m, int n, int nnz, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *nzval, int *nzval_colptr, int *rowind, int *rowind_colptr, int *col_to_sup, int *sup_to_col, <a class="el" href="supermatrix_8h.html#9d2ddedeb2a3d92e950811c61d0b8796">Stype_t</a> stype, <a class="el" href="supermatrix_8h.html#7987cb2a28ec879b39a90e9e48e29190">Dtype_t</a> dtype, <a class="el" href="supermatrix_8h.html#5962adac634f3feebe487ad443802d60">Mtype_t</a> mtype)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#ee4cad234e4df121da5386a86754dd4d">zCompRow_to_CompCol</a> (int m, int n, int nnz, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *a, int *colind, int *rowptr, <a class="el" href="structdoublecomplex.html">doublecomplex</a> **at, int **rowind, int **colptr)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert a row compressed storage into a column compressed storage.  <a href="#ee4cad234e4df121da5386a86754dd4d"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#7f3c67eba79f4d63a7ef19781935985d">zPrint_CompCol_Matrix</a> (char *what, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *A)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Routines for debugging.  <a href="#7f3c67eba79f4d63a7ef19781935985d"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#12d2264eb0e17728142e651de7cc8f9c">zPrint_SuperNode_Matrix</a> (char *what, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *A)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#d665640e89334e9f7a57355e030ff63d">zPrint_Dense_Matrix</a> (char *what, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *A)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#8083f641fd96ede2f54db44d18f984e9">zprint_lu_col</a> (char *msg, int jcol, int pivrow, int *xprune, <a class="el" href="structGlobalLU__t.html">GlobalLU_t</a> *Glu)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Diagnostic print of column "jcol" in the U/L factor.  <a href="#8083f641fd96ede2f54db44d18f984e9"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#bbfe87885f0f664d31b4f6fcf2180127">zcheck_tempv</a> (int n, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *tempv)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether tempv[] == 0. This should be true before and after calling any numeric routines, i.e., "panel_bmod" and "column_bmod".  <a href="#bbfe87885f0f664d31b4f6fcf2180127"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#a81fbc4bdd835def817191d94fb8b208">zGenXtrue</a> (int n, int nrhs, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *x, int ldx)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#cf2b404121b9a70942631f50b85fd8a1">zFillRHS</a> (<a class="el" href="slu__util_8h.html#0c4e17b2d5cea33f9991ccc6a6678d62">trans_t</a> trans, int nrhs, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *x, int ldx, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *A, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *B)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Let rhs[i] = sum of i-th row of A, so the solution vector is all 1's.  <a href="#cf2b404121b9a70942631f50b85fd8a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#c1c222f7cb3253d97408d9395d6919d4">zfill</a> (<a class="el" href="structdoublecomplex.html">doublecomplex</a> *a, int alen, <a class="el" href="structdoublecomplex.html">doublecomplex</a> dval)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fills a doublecomplex precision array with a given value.  <a href="#c1c222f7cb3253d97408d9395d6919d4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#0c645d9e2d757c5f5fa1ecd67f0c2a07">zinf_norm_error</a> (int nrhs, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *X, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *xtrue)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check the inf-norm of the error vector.  <a href="#0c645d9e2d757c5f5fa1ecd67f0c2a07"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#0807017bff32a20ff59820583a9e038d">zPrintPerf</a> (<a class="el" href="structSuperMatrix.html">SuperMatrix</a> *L, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *U, <a class="el" href="structmem__usage__t.html">mem_usage_t</a> *mem_usage, double rpg, double rcond, double *ferr, double *berr, char *equed, <a class="el" href="structSuperLUStat__t.html">SuperLUStat_t</a> *stat)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print performance of the code.  <a href="#0807017bff32a20ff59820583a9e038d"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="zutil_8c.html#d40a765de4b05c0ab07d3299aa93b6da">print_doublecomplex_vec</a> (char *what, int n, <a class="el" href="structdoublecomplex.html">doublecomplex</a> *vec)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2><pre> -- SuperLU routine (version 3.1) -- Univ. of California Berkeley, Xerox Palo Alto Research Center, and Lawrence Berkeley National Lab. August 1, 2008</pre><p><pre> Copyright (c) 1994 by Xerox Corporation.  All rights reserved.</pre><p><pre> THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.</pre><p><pre> Permission is hereby granted to use or copy this program for any purpose, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. </pre> <hr><h2>Function Documentation</h2><a class="anchor" name="d40a765de4b05c0ab07d3299aa93b6da"></a><!-- doxytag: member="zutil.c::print_doublecomplex_vec" ref="d40a765de4b05c0ab07d3299aa93b6da" args="(char *what, int n, doublecomplex *vec)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">print_doublecomplex_vec           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">char *&nbsp;</td>          <td class="mdname" nowrap> <em>what</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>n</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="structdoublecomplex.html">doublecomplex</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>vec</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a class="anchor" name="bbfe87885f0f664d31b4f6fcf2180127"></a><!-- doxytag: member="zutil.c::zcheck_tempv" ref="bbfe87885f0f664d31b4f6fcf2180127" args="(int n, doublecomplex *tempv)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void zcheck_tempv           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap> <em>n</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="structdoublecomplex.html">doublecomplex</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>tempv</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a class="anchor" name="ee4cad234e4df121da5386a86754dd4d"></a><!-- doxytag: member="zutil.c::zCompRow_to_CompCol" ref="ee4cad234e4df121da5386a86754dd4d" args="(int m, int n, int nnz, doublecomplex *a, int *colind, int *rowptr, doublecomplex **at, int **rowind, int **colptr)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void zCompRow_to_CompCol           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap> <em>m</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>n</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>nnz</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="structdoublecomplex.html">doublecomplex</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>a</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int *&nbsp;</td>          <td class="mdname" nowrap> <em>colind</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int *&nbsp;</td>          <td class="mdname" nowrap> <em>rowptr</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="structdoublecomplex.html">doublecomplex</a> **&nbsp;</td>          <td class="mdname" nowrap> <em>at</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int **&nbsp;</td>          <td class="mdname" nowrap> <em>rowind</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int **&nbsp;</td>          <td class="mdname" nowrap> <em>colptr</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a class="anchor" name="6d326511607c3cb8c0b654b675bd3700"></a><!-- doxytag: member="zutil.c::zCopy_CompCol_Matrix" ref="6d326511607c3cb8c0b654b675bd3700" args="(SuperMatrix *A, SuperMatrix *B)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void zCopy_CompCol_Matrix           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>A</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="structSuperMatrix.html">SuperMatrix</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>B</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a class="anchor" name="6632ad6334d30a38c9e8b026a3983b65"></a><!-- doxytag: member="zutil.c::zCopy_Dense_Matrix" ref="6632ad6334d30a38c9e8b026a3983b65" args="(int M, int N, doublecomplex *X, int ldx, doublecomplex *Y, int ldy)" --><p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?