Blob Blame Raw
<!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/slu_scomplex.h 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&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>SRC/slu_scomplex.h File Reference</h1>Header file for <a class="el" href="structcomplex.html">complex</a> operations. <a href="#_details">More...</a>
<p>

<p>
<a href="slu__scomplex_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcomplex.html">complex</a></td></tr>

<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#f3df9377099fd2cba886d217734ce884">c_add</a>(c, a, b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Complex Addition c = a + b.  <a href="#f3df9377099fd2cba886d217734ce884"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#0fe6bb9dac5f735dd69a127519a9c841">c_sub</a>(c, a, b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Complex Subtraction c = a - b.  <a href="#0fe6bb9dac5f735dd69a127519a9c841"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#a675d825b907fe4d939ddc2533b38bb8">cs_mult</a>(c, a, b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Complex-Double Multiplication.  <a href="#a675d825b907fe4d939ddc2533b38bb8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#515037047a218e7f77c4f495b1d6abca">cc_mult</a>(c, a, b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Complex-Complex Multiplication.  <a href="#515037047a218e7f77c4f495b1d6abca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#c917679ece23ee5f61e994fb56b30e1c">cc_conj</a>(a, b)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#82b7c0f8931b82e92d24a076eab0e82e">c_eq</a>(a, b)&nbsp;&nbsp;&nbsp;( (a)-&gt;r == (b)-&gt;r &amp;&amp; (a)-&gt;i == (b)-&gt;i )</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Complex equality testing.  <a href="#82b7c0f8931b82e92d24a076eab0e82e"></a><br></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="slu__scomplex_8h.html#6b7d3c87a3029e808bb32eed7dad81f7">c_div</a> (<a class="el" href="structcomplex.html">complex</a> *, <a class="el" href="structcomplex.html">complex</a> *, <a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Complex Division c = a/b.  <a href="#6b7d3c87a3029e808bb32eed7dad81f7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#f55ee2cd6c55b5ad16136940080c9f67">c_abs</a> (<a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns sqrt(z.r^2 + z.i^2).  <a href="#f55ee2cd6c55b5ad16136940080c9f67"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#47b65089087d28e542f04907937cb8a9">c_abs1</a> (<a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Approximates the abs. Returns abs(z.r) + abs(z.i).  <a href="#47b65089087d28e542f04907937cb8a9"></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="slu__scomplex_8h.html#36d8645ac9bf1eb00128329fe5edb982">c_exp</a> (<a class="el" href="structcomplex.html">complex</a> *, <a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the exponentiation.  <a href="#36d8645ac9bf1eb00128329fe5edb982"></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="slu__scomplex_8h.html#0837d7f15d3b03860fdd17de957c788c">r_cnjg</a> (<a class="el" href="structcomplex.html">complex</a> *, <a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <a class="el" href="structcomplex.html">complex</a> conjugate.  <a href="#0837d7f15d3b03860fdd17de957c788c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#29e2cb7ddb38711cdae8f6dc4481a80f">r_imag</a> (<a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the imaginary part.  <a href="#29e2cb7ddb38711cdae8f6dc4481a80f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structcomplex.html">complex</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#8b1147936f5b008b9cba0a9745199519">c_sgn</a> (<a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">SIGN functions for <a class="el" href="structcomplex.html">complex</a> number. Returns z/abs(z).  <a href="#8b1147936f5b008b9cba0a9745199519"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structcomplex.html">complex</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="slu__scomplex_8h.html#d2e9c9356a42769f53e741e68e1aac9d">c_sqrt</a> (<a class="el" href="structcomplex.html">complex</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Square-root of a <a class="el" href="structcomplex.html">complex</a> number.  <a href="#d2e9c9356a42769f53e741e68e1aac9d"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<pre> 
  -- SuperLU routine (version 2.0) --
 Univ. of California Berkeley, Xerox Palo Alto Research Center,
 and Lawrence Berkeley National Lab.
 November 15, 1997</pre><p>
<pre> Contains definitions for various <a class="el" href="structcomplex.html">complex</a> operations.
 This header file is to be included in source files c*.c
 </pre> <hr><h2>Define Documentation</h2>
<a class="anchor" name="f3df9377099fd2cba886d217734ce884"></a><!-- doxytag: member="slu_scomplex.h::c_add" ref="f3df9377099fd2cba886d217734ce884" args="(c, a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define c_add          </td>
          <td>(</td>
          <td class="paramtype">c,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">a,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ (c)-&gt;r = (a)-&gt;r + (b)-&gt;r; \
                         (c)-&gt;i = (a)-&gt;i + (b)-&gt;i; }
</pre></div>
</div>
</div><p>
<a class="anchor" name="82b7c0f8931b82e92d24a076eab0e82e"></a><!-- doxytag: member="slu_scomplex.h::c_eq" ref="82b7c0f8931b82e92d24a076eab0e82e" args="(a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define c_eq          </td>
          <td>(</td>
          <td class="paramtype">a,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;( (a)-&gt;r == (b)-&gt;r &amp;&amp; (a)-&gt;i == (b)-&gt;i )</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="0fe6bb9dac5f735dd69a127519a9c841"></a><!-- doxytag: member="slu_scomplex.h::c_sub" ref="0fe6bb9dac5f735dd69a127519a9c841" args="(c, a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define c_sub          </td>
          <td>(</td>
          <td class="paramtype">c,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">a,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ (c)-&gt;r = (a)-&gt;r - (b)-&gt;r; \
                         (c)-&gt;i = (a)-&gt;i - (b)-&gt;i; }
</pre></div>
</div>
</div><p>
<a class="anchor" name="c917679ece23ee5f61e994fb56b30e1c"></a><!-- doxytag: member="slu_scomplex.h::cc_conj" ref="c917679ece23ee5f61e994fb56b30e1c" args="(a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cc_conj          </td>
          <td>(</td>
          <td class="paramtype">a,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
        (a)-&gt;r = (b)-&gt;r; \
        (a)-&gt;i = -((b)-&gt;i); \
    }
</pre></div>
</div>
</div><p>
<a class="anchor" name="515037047a218e7f77c4f495b1d6abca"></a><!-- doxytag: member="slu_scomplex.h::cc_mult" ref="515037047a218e7f77c4f495b1d6abca" args="(c, a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cc_mult          </td>
          <td>(</td>
          <td class="paramtype">c,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">a,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
        <span class="keywordtype">float</span> cr, ci; \
        cr = (a)-&gt;r * (b)-&gt;r - (a)-&gt;i * (b)-&gt;i; \
        ci = (a)-&gt;i * (b)-&gt;r + (a)-&gt;r * (b)-&gt;i; \
        (c)-&gt;r = cr; \
        (c)-&gt;i = ci; \
    }
</pre></div>
</div>
</div><p>
<a class="anchor" name="a675d825b907fe4d939ddc2533b38bb8"></a><!-- doxytag: member="slu_scomplex.h::cs_mult" ref="a675d825b907fe4d939ddc2533b38bb8" args="(c, a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cs_mult          </td>
          <td>(</td>
          <td class="paramtype">c,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">a,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ (c)-&gt;r = (a)-&gt;r * (b); \
                           (c)-&gt;i = (a)-&gt;i * (b); }
</pre></div>
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="f55ee2cd6c55b5ad16136940080c9f67"></a><!-- doxytag: member="slu_scomplex.h::c_abs" ref="f55ee2cd6c55b5ad16136940080c9f67" args="(complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double c_abs           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="47b65089087d28e542f04907937cb8a9"></a><!-- doxytag: member="slu_scomplex.h::c_abs1" ref="47b65089087d28e542f04907937cb8a9" args="(complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double c_abs1           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="6b7d3c87a3029e808bb32eed7dad81f7"></a><!-- doxytag: member="slu_scomplex.h::c_div" ref="6b7d3c87a3029e808bb32eed7dad81f7" args="(complex *, complex *, complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void c_div           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"></td><td>&nbsp;</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="36d8645ac9bf1eb00128329fe5edb982"></a><!-- doxytag: member="slu_scomplex.h::c_exp" ref="36d8645ac9bf1eb00128329fe5edb982" args="(complex *, complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void c_exp           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"></td><td>&nbsp;</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="8b1147936f5b008b9cba0a9745199519"></a><!-- doxytag: member="slu_scomplex.h::c_sgn" ref="8b1147936f5b008b9cba0a9745199519" args="(complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcomplex.html">complex</a> c_sgn           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="d2e9c9356a42769f53e741e68e1aac9d"></a><!-- doxytag: member="slu_scomplex.h::c_sqrt" ref="d2e9c9356a42769f53e741e68e1aac9d" args="(complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcomplex.html">complex</a> c_sqrt           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="0837d7f15d3b03860fdd17de957c788c"></a><!-- doxytag: member="slu_scomplex.h::r_cnjg" ref="0837d7f15d3b03860fdd17de957c788c" args="(complex *, complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void r_cnjg           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"></td><td>&nbsp;</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="29e2cb7ddb38711cdae8f6dc4481a80f"></a><!-- doxytag: member="slu_scomplex.h::r_imag" ref="29e2cb7ddb38711cdae8f6dc4481a80f" args="(complex *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double r_imag           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 22 10:23:48 2010 for SuperLU by&nbsp;
<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>