<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CPPLapack: zhsmatrix-misc.hpp Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">CPPLapack
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_a37d0dd275f7ec49ee26f1d33d1059f5.html">include</a>      </li>
      <li class="navelem"><a class="el" href="dir_552c8cbbc97996c8dc38aaad45a66f6f.html">zhsmatrix-</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">zhsmatrix-misc.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="zhsmatrix-misc_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00002"></a>00002 <span class="comment">/*! clear all the matrix data and set the sizes 0 */</span>
<a name="l00003"></a><a class="code" href="classzhsmatrix.html#a696666c7ea7bd6701e74c2256ce4b0b4">00003</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classzhsmatrix.html#a696666c7ea7bd6701e74c2256ce4b0b4">zhsmatrix::clear</a>()
<a name="l00004"></a>00004 {VERBOSE_REPORT;
<a name="l00005"></a>00005   <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> =0;
<a name="l00006"></a>00006   <a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.clear();
<a name="l00007"></a>00007   <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>.clear();
<a name="l00008"></a>00008 }
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">/*! change the matrix into a zero matrix */</span>
<a name="l00012"></a><a class="code" href="classzhsmatrix.html#a62082cf8a407a5832937c92dabfe29e6">00012</a> <span class="keyword">inline</span> <a class="code" href="classzhsmatrix.html" title="Complex Double-precision Hermitian Sparse Matrix Class.">zhsmatrix</a>&amp; <a class="code" href="classzhsmatrix.html#a62082cf8a407a5832937c92dabfe29e6">zhsmatrix::zero</a>()
<a name="l00013"></a>00013 {VERBOSE_REPORT;
<a name="l00014"></a>00014   <a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.resize(0);
<a name="l00015"></a>00015   <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>=0; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>&lt;<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){ <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>].resize(0); }
<a name="l00016"></a>00016   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00017"></a>00017 }
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00020"></a>00020 <span class="comment">/*! change sign(+/-) of the matrix */</span>
<a name="l00021"></a><a class="code" href="classzhsmatrix.html#a0eceae2eff19339214a4cc02c005e0d6">00021</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classzhsmatrix.html#a0eceae2eff19339214a4cc02c005e0d6">zhsmatrix::chsign</a>()
<a name="l00022"></a>00022 {VERBOSE_REPORT;
<a name="l00023"></a>00023   <span class="keywordflow">for</span>(std::vector&lt;zcomponent&gt;::iterator it=<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.begin(); it!=<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.end(); it++){
<a name="l00024"></a>00024     it-&gt;v =-it-&gt;v;
<a name="l00025"></a>00025   }
<a name="l00026"></a>00026 }
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00029"></a>00029 <span class="comment">/*! make a deep copy of the matrix */</span>
<a name="l00030"></a><a class="code" href="classzhsmatrix.html#a183494a2cfaac8dddcd6677d5621b710">00030</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classzhsmatrix.html#a183494a2cfaac8dddcd6677d5621b710">zhsmatrix::copy</a>(<span class="keyword">const</span> <a class="code" href="classzhsmatrix.html" title="Complex Double-precision Hermitian Sparse Matrix Class.">zhsmatrix</a>&amp; mat)
<a name="l00031"></a>00031 {VERBOSE_REPORT;
<a name="l00032"></a>00032   <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> =mat.<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>;
<a name="l00033"></a>00033   <a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a> =mat.<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>;
<a name="l00034"></a>00034   <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a> =mat.<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>;
<a name="l00035"></a>00035 }
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00038"></a>00038 <span class="comment">/*! make a shallow copy of the matrix\n</span>
<a name="l00039"></a>00039 <span class="comment">  This function is not designed to be used in project codes. */</span>
<a name="l00040"></a><a class="code" href="classzhsmatrix.html#aa848df01ebe02c8419eeceea811f4284">00040</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classzhsmatrix.html#aa848df01ebe02c8419eeceea811f4284">zhsmatrix::shallow_copy</a>(<span class="keyword">const</span> <a class="code" href="class__zhsmatrix.html" title="(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Sparse Matrix Class">_zhsmatrix</a>&amp; mat)
<a name="l00041"></a>00041 {VERBOSE_REPORT;
<a name="l00042"></a>00042   <a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.clear();
<a name="l00043"></a>00043   <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>.clear();
<a name="l00044"></a>00044   
<a name="l00045"></a>00045   <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> =mat.<a class="code" href="class__zhsmatrix.html#ac25730885b10f41559803ed1e3ae64d3" title="matrix column size">n</a>;
<a name="l00046"></a>00046   <a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.swap(mat.<a class="code" href="class__zhsmatrix.html#aaf53fd779b33dc934affae65d0729197" title="matrix data">data</a>);
<a name="l00047"></a>00047   <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>.swap(mat.<a class="code" href="class__zhsmatrix.html#a5f4e2177c53d27c262f4cbcbf0096839" title="vector of vector to store the entry information of component for each row and column">line</a>);
<a name="l00048"></a>00048   
<a name="l00049"></a>00049   mat.<a class="code" href="class__zhsmatrix.html#af9a0e022140eea0e4bbe8fc874f68f9b">nullify</a>();
<a name="l00050"></a>00050 }
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00053"></a>00053 <span class="comment">/*! resize the matrix */</span>
<a name="l00054"></a><a class="code" href="classzhsmatrix.html#a1419b04b140ede221bb2d892901a8b56">00054</a> <span class="keyword">inline</span> <a class="code" href="classzhsmatrix.html" title="Complex Double-precision Hermitian Sparse Matrix Class.">zhsmatrix</a>&amp; <a class="code" href="classzhsmatrix.html#a1419b04b140ede221bb2d892901a8b56">zhsmatrix::resize</a>(<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; _n, <span class="keyword">const</span> <span class="keywordtype">long</span> _c, <span class="keyword">const</span> <span class="keywordtype">long</span> _l)
<a name="l00055"></a>00055 {VERBOSE_REPORT;
<a name="l00056"></a>00056 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span>  <span class="keywordflow">if</span>( _n&lt;0 || _c&lt;0 || _l&lt;0 ){
<a name="l00058"></a>00058     ERROR_REPORT;
<a name="l00059"></a>00059     std::cerr &lt;&lt; <span class="stringliteral">&quot;Matrix sizes and the length of arrays must be positive integers. &quot;</span> &lt;&lt; std::endl
<a name="l00060"></a>00060               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; _n &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; _c &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; _l &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00061"></a>00061     exit(1);
<a name="l00062"></a>00062   }
<a name="l00063"></a>00063 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span>  
<a name="l00065"></a>00065   <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> =_n;
<a name="l00066"></a>00066   <a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.resize(0);
<a name="l00067"></a>00067   <a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.reserve(_c);
<a name="l00068"></a>00068   <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>.resize(<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>);
<a name="l00069"></a>00069   <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>=0; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>&lt;<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00070"></a>00070     <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>].resize(0);
<a name="l00071"></a>00071     <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>].reserve(_l);
<a name="l00072"></a>00072   }
<a name="l00073"></a>00073   
<a name="l00074"></a>00074   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00075"></a>00075 }
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00078"></a>00078 <span class="comment">/*! stretch the matrix size */</span>
<a name="l00079"></a><a class="code" href="classzhsmatrix.html#a87bb18b53fc193239c73bfea55c923ff">00079</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classzhsmatrix.html#a87bb18b53fc193239c73bfea55c923ff">zhsmatrix::stretch</a>(<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; dn)
<a name="l00080"></a>00080 {VERBOSE_REPORT;
<a name="l00081"></a>00081   <span class="keywordflow">if</span>(dn==0){ <span class="keywordflow">return</span>; }
<a name="l00082"></a>00082   
<a name="l00083"></a>00083 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span>  <span class="keywordflow">if</span>( <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>+dn&lt;0 ){
<a name="l00085"></a>00085     ERROR_REPORT;
<a name="l00086"></a>00086     std::cerr &lt;&lt; <span class="stringliteral">&quot;The new matrix size must be larger than zero.&quot;</span> &lt;&lt; std::endl
<a name="l00087"></a>00087               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; dn &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00088"></a>00088     exit(1);
<a name="l00089"></a>00089   }
<a name="l00090"></a>00090 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span>  
<a name="l00092"></a>00092   <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> +=dn;
<a name="l00093"></a>00093   
<a name="l00094"></a>00094   <span class="keywordflow">if</span>(dn&lt;0){<span class="comment"></span>
<a name="l00095"></a>00095 <span class="comment">    //// delete components over the new size ////</span>
<a name="l00096"></a>00096 <span class="comment"></span>    <span class="keywordflow">for</span>(std::vector&lt;zcomponent&gt;::reverse_iterator it=<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.rbegin(); it!=<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.rend(); it++){
<a name="l00097"></a>00097       <span class="keywordflow">if</span>( <span class="keywordtype">long</span>(it-&gt;i)&gt;=<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> ){ <a class="code" href="classzhsmatrix.html#a8b0387dbd5d1ffdb6793e7ba1d1170a6">del</a>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.rend()-it-1); }
<a name="l00098"></a>00098     }<span class="comment"></span>
<a name="l00099"></a>00099 <span class="comment">    //// shrink line ////</span>
<a name="l00100"></a>00100 <span class="comment"></span>    <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>=0; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>&lt;-dn; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00101"></a>00101       <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>.pop_back();
<a name="l00102"></a>00102     }
<a name="l00103"></a>00103   }
<a name="l00104"></a>00104   <span class="keywordflow">else</span>{<span class="comment">//dn&gt;0</span><span class="comment"></span>
<a name="l00105"></a>00105 <span class="comment">    //// expand line ////</span>
<a name="l00106"></a>00106 <span class="comment"></span>    <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>=0; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>&lt;dn; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00107"></a>00107       <a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>.push_back( std::vector&lt;uint32_t&gt;(0) );
<a name="l00108"></a>00108     }
<a name="l00109"></a>00109   }
<a name="l00110"></a>00110 }
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00113"></a>00113 <span class="comment">/*! check if the component is listed */</span>
<a name="l00114"></a><a class="code" href="classzhsmatrix.html#a7c59ac599f8e53261ada6819e174272b">00114</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classzhsmatrix.html#a7c59ac599f8e53261ada6819e174272b">zhsmatrix::isListed</a>(<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>, <span class="keyword">const</span> <span class="keywordtype">long</span>&amp; j)<span class="keyword"> const</span>
<a name="l00115"></a>00115 <span class="keyword"></span>{VERBOSE_REPORT;
<a name="l00116"></a>00116 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span>  <span class="keywordflow">if</span>( i&lt;0 || j&lt;0 || <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>&lt;=i || <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>&lt;=j ){
<a name="l00118"></a>00118     ERROR_REPORT;
<a name="l00119"></a>00119     std::cerr &lt;&lt; <span class="stringliteral">&quot;The required component is out of the matrix size.&quot;</span> &lt;&lt; std::endl
<a name="l00120"></a>00120               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; i &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; j &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00121"></a>00121     exit(1);
<a name="l00122"></a>00122   }
<a name="l00123"></a>00123 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span>  
<a name="l00125"></a>00125   <span class="keyword">const</span> uint32_t ii(std::max(i,j)), jj(std::min(i,j));
<a name="l00126"></a>00126   <span class="keywordflow">for</span>(std::vector&lt;uint32_t&gt;::const_iterator p=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[ii].begin(); p!=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[ii].end(); p++){
<a name="l00127"></a>00127     <span class="keywordflow">if</span>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].j==jj){ <span class="keywordflow">return</span> 1; }
<a name="l00128"></a>00128   }
<a name="l00129"></a>00129   <span class="keywordflow">return</span> 0;
<a name="l00130"></a>00130 }
<a name="l00131"></a>00131 
<a name="l00132"></a>00132 
<a name="l00133"></a>00133 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00134"></a>00134 <span class="comment">/*! return the element number of the component */</span>
<a name="l00135"></a><a class="code" href="classzhsmatrix.html#aaf14aba87eab8755192efc337ef5d423">00135</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classzhsmatrix.html#aaf14aba87eab8755192efc337ef5d423">zhsmatrix::number</a>(<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>, <span class="keyword">const</span> <span class="keywordtype">long</span>&amp; j)<span class="keyword"> const</span>
<a name="l00136"></a>00136 <span class="keyword"></span>{VERBOSE_REPORT;
<a name="l00137"></a>00137 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00138"></a>00138 <span class="preprocessor"></span>  <span class="keywordflow">if</span>( i&lt;0 || j&lt;0 || <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>&lt;=i || <a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>&lt;=j ){
<a name="l00139"></a>00139     ERROR_REPORT;
<a name="l00140"></a>00140     std::cerr &lt;&lt; <span class="stringliteral">&quot;The required component is out of the matrix size.&quot;</span> &lt;&lt; std::endl
<a name="l00141"></a>00141               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; i &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; j &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00142"></a>00142     exit(1);
<a name="l00143"></a>00143   }
<a name="l00144"></a>00144 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span>  
<a name="l00146"></a>00146   <span class="keyword">const</span> uint32_t ii(std::max(i,j)), jj(std::min(i,j));
<a name="l00147"></a>00147   <span class="keywordflow">for</span>(std::vector&lt;uint32_t&gt;::const_iterator p=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[ii].begin(); p!=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[ii].end(); p++){
<a name="l00148"></a>00148     <span class="keywordflow">if</span>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].j==jj){ <span class="keywordflow">return</span> *p; }
<a name="l00149"></a>00149   }
<a name="l00150"></a>00150   <span class="keywordflow">return</span> -1;
<a name="l00151"></a>00151 }
<a name="l00152"></a>00152 <span class="comment"></span>
<a name="l00153"></a>00153 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00154"></a>00154 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00155"></a>00155 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00156"></a>00156 <span class="comment"></span>
<a name="l00157"></a>00157 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00158"></a>00158 <span class="comment">/*! get row of the matrix */</span>
<a name="l00159"></a><a class="code" href="classzhsmatrix.html#a5fe7649477fedd14c89865956fa8c5f3">00159</a> <span class="keyword">inline</span> <a class="code" href="class__zrovector.html" title="(DO NOT USE) Smart-temporary Complex Double-precision Row Vector Class">_zrovector</a> <a class="code" href="classzhsmatrix.html#a5fe7649477fedd14c89865956fa8c5f3">zhsmatrix::row</a>(<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; _m)<span class="keyword"> const</span>
<a name="l00160"></a>00160 <span class="keyword"></span>{VERBOSE_REPORT;
<a name="l00161"></a>00161 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00162"></a>00162 <span class="preprocessor"></span>  <span class="keywordflow">if</span>( _m&lt;0 || _m&gt;<a class="code" href="classzhsmatrix.html#ad01f0f8b364916b88d72c0e08b45815e" title="matrix row size">m</a> ){
<a name="l00163"></a>00163     ERROR_REPORT;
<a name="l00164"></a>00164     std::cerr &lt;&lt; <span class="stringliteral">&quot;Input row number must be between 0 and &quot;</span> &lt;&lt; m &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl
<a name="l00165"></a>00165               &lt;&lt; <span class="stringliteral">&quot;Your input was &quot;</span> &lt;&lt; _m &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl;
<a name="l00166"></a>00166     exit(1);
<a name="l00167"></a>00167   }
<a name="l00168"></a>00168 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span>  
<a name="l00170"></a>00170   <a class="code" href="classzrovector.html" title="Complex Double-precision Row Vector Class.">zrovector</a> vec( <a class="code" href="classzrovector.html" title="Complex Double-precision Row Vector Class.">zrovector</a>(<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>).<a class="code" href="classzhsmatrix.html#a62082cf8a407a5832937c92dabfe29e6">zero</a>() );
<a name="l00171"></a>00171   <span class="keywordflow">for</span>(std::vector&lt;uint32_t&gt;::const_iterator p=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[_m].begin(); p!=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[_m].end(); p++){
<a name="l00172"></a>00172     <span class="keywordflow">if</span>( <span class="keywordtype">long</span>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>)==_m ){<span class="comment">//i&gt;=j</span>
<a name="l00173"></a>00173       vec(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].j) =<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].v;
<a name="l00174"></a>00174     }
<a name="l00175"></a>00175     <span class="keywordflow">else</span>{<span class="comment">//i&lt;j</span>
<a name="l00176"></a>00176       vec(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].i) =<a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">std::conj</a>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].v);
<a name="l00177"></a>00177     }
<a name="l00178"></a>00178   }
<a name="l00179"></a>00179   <span class="keywordflow">return</span> <a class="code" href="classzhsmatrix.html#a9fe3e3006bc80db5c3f24b601f5a3458">_</a>(vec);
<a name="l00180"></a>00180 }
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00183"></a>00183 <span class="comment">/*! get column of the matrix */</span>
<a name="l00184"></a><a class="code" href="classzhsmatrix.html#aa3606396aa3cfd30a28a37efa9a0135c">00184</a> <span class="keyword">inline</span> <a class="code" href="class__zcovector.html" title="(DO NOT USE) Smart-temporary Complex Double-precision Column Vector Class">_zcovector</a> <a class="code" href="classzhsmatrix.html#aa3606396aa3cfd30a28a37efa9a0135c">zhsmatrix::col</a>(<span class="keyword">const</span> <span class="keywordtype">long</span>&amp; _n)<span class="keyword"> const</span>
<a name="l00185"></a>00185 <span class="keyword"></span>{VERBOSE_REPORT;
<a name="l00186"></a>00186 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00187"></a>00187 <span class="preprocessor"></span>  <span class="keywordflow">if</span>( _n&lt;0 || _n&gt;<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> ){
<a name="l00188"></a>00188     ERROR_REPORT;
<a name="l00189"></a>00189     std::cerr &lt;&lt; <span class="stringliteral">&quot;Input row number must be between 0 and &quot;</span> &lt;&lt; n &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl
<a name="l00190"></a>00190               &lt;&lt; <span class="stringliteral">&quot;Your input was &quot;</span> &lt;&lt; _n &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl;
<a name="l00191"></a>00191     exit(1);
<a name="l00192"></a>00192   }
<a name="l00193"></a>00193 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00194"></a>00194 <span class="preprocessor"></span>  
<a name="l00195"></a>00195   <a class="code" href="classzcovector.html" title="Complex Double-precision Column Vector Class.">zcovector</a> vec( <a class="code" href="classzcovector.html" title="Complex Double-precision Column Vector Class.">zcovector</a>(<a class="code" href="classzhsmatrix.html#ad01f0f8b364916b88d72c0e08b45815e" title="matrix row size">m</a>).<a class="code" href="classzhsmatrix.html#a62082cf8a407a5832937c92dabfe29e6">zero</a>() );
<a name="l00196"></a>00196   <span class="keywordflow">for</span>(std::vector&lt;uint32_t&gt;::const_iterator p=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[_n].begin(); p!=<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>[_n].end(); p++){
<a name="l00197"></a>00197     <span class="keywordflow">if</span>( <span class="keywordtype">long</span>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>)==_n ){<span class="comment">//i&lt;j</span>
<a name="l00198"></a>00198       vec(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].j) =<a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">std::conj</a>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].v);
<a name="l00199"></a>00199     }
<a name="l00200"></a>00200     <span class="keywordflow">else</span>{<span class="comment">//i&gt;=j</span>
<a name="l00201"></a>00201       vec(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].i) =<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>[*p].v;
<a name="l00202"></a>00202     }
<a name="l00203"></a>00203   }
<a name="l00204"></a>00204   <span class="keywordflow">return</span> <a class="code" href="classzhsmatrix.html#a9fe3e3006bc80db5c3f24b601f5a3458">_</a>(vec);
<a name="l00205"></a>00205 }
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00208"></a>00208 <span class="comment">/*! erase components less than DBL_MIN */</span>
<a name="l00209"></a><a class="code" href="classzhsmatrix.html#a75419e3f67a894be7f5f28a01bbb4489">00209</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classzhsmatrix.html#a75419e3f67a894be7f5f28a01bbb4489">zhsmatrix::diet</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> eps)
<a name="l00210"></a>00210 {VERBOSE_REPORT;
<a name="l00211"></a>00211   <span class="keywordflow">for</span>(std::vector&lt;zcomponent&gt;::reverse_iterator it=<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.rbegin(); it!=<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.rend(); it++){
<a name="l00212"></a>00212     <span class="keywordflow">if</span>( fabs(it-&gt;v.real())&lt;eps &amp;&amp; fabs(it-&gt;v.imag())&lt;eps ){
<a name="l00213"></a>00213       <a class="code" href="classzhsmatrix.html#a8b0387dbd5d1ffdb6793e7ba1d1170a6">del</a>(<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>.rend()-it-1);
<a name="l00214"></a>00214     }
<a name="l00215"></a>00215   }
<a name="l00216"></a>00216 }
<a name="l00217"></a>00217 <span class="comment"></span>
<a name="l00218"></a>00218 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00219"></a>00219 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00220"></a>00220 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00221"></a>00221 <span class="comment"></span>
<a name="l00222"></a>00222 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00223"></a>00223 <span class="comment">/*! swap two matrices */</span>
<a name="l00224"></a><a class="code" href="zhsmatrix-misc_8hpp.html#a3c88eff629376b6cec5085f1d1d0de78">00224</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="dcovector-misc_8hpp.html#a4f6cde9aa05d9af1ec9bf725dd664869">swap</a>(<a class="code" href="classzhsmatrix.html" title="Complex Double-precision Hermitian Sparse Matrix Class.">zhsmatrix</a>&amp; A, <a class="code" href="classzhsmatrix.html" title="Complex Double-precision Hermitian Sparse Matrix Class.">zhsmatrix</a>&amp; B)
<a name="l00225"></a>00225 {VERBOSE_REPORT;
<a name="l00226"></a>00226   <a class="code" href="dcovector-misc_8hpp.html#a4f6cde9aa05d9af1ec9bf725dd664869">std::swap</a>(A.<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>,B.<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>);
<a name="l00227"></a>00227   <a class="code" href="dcovector-misc_8hpp.html#a4f6cde9aa05d9af1ec9bf725dd664869">std::swap</a>(A.<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>,B.<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>);
<a name="l00228"></a>00228   <a class="code" href="dcovector-misc_8hpp.html#a4f6cde9aa05d9af1ec9bf725dd664869">std::swap</a>(A.<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>,B.<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>);
<a name="l00229"></a>00229 }
<a name="l00230"></a>00230 
<a name="l00231"></a>00231 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00232"></a>00232 <span class="comment">/*! convert user object to smart-temporary object */</span>
<a name="l00233"></a><a class="code" href="zhsmatrix-misc_8hpp.html#a0bb4334c9469c81604c2ec071e90f96b">00233</a> <span class="keyword">inline</span> <a class="code" href="class__zhsmatrix.html" title="(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Sparse Matrix Class">_zhsmatrix</a> <a class="code" href="dcovector-misc_8hpp.html#a297beda6502b0d92c99576d2fb9548cb">_</a>(<a class="code" href="classzhsmatrix.html" title="Complex Double-precision Hermitian Sparse Matrix Class.">zhsmatrix</a>&amp; mat)
<a name="l00234"></a>00234 {VERBOSE_REPORT;
<a name="l00235"></a>00235   <a class="code" href="class__zhsmatrix.html" title="(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Sparse Matrix Class">_zhsmatrix</a> newmat;<span class="comment"></span>
<a name="l00236"></a>00236 <span class="comment">  //////// shallow copy ////////</span>
<a name="l00237"></a>00237 <span class="comment"></span>  newmat.<a class="code" href="class__zhsmatrix.html#ac25730885b10f41559803ed1e3ae64d3" title="matrix column size">n</a> =mat.<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a>;
<a name="l00238"></a>00238   <a class="code" href="dcovector-misc_8hpp.html#a4f6cde9aa05d9af1ec9bf725dd664869">std::swap</a>(newmat.<a class="code" href="class__zhsmatrix.html#aaf53fd779b33dc934affae65d0729197" title="matrix data">data</a>, mat.<a class="code" href="classzhsmatrix.html#aaf52f103dbedb011a7ef72526bf4b486" title="matrix data">data</a>);
<a name="l00239"></a>00239   <a class="code" href="dcovector-misc_8hpp.html#a4f6cde9aa05d9af1ec9bf725dd664869">std::swap</a>(newmat.<a class="code" href="class__zhsmatrix.html#a5f4e2177c53d27c262f4cbcbf0096839" title="vector of vector to store the entry information of component for each row and column">line</a>, mat.<a class="code" href="classzhsmatrix.html#a0d2e9226d4c6ac5c8ce99c17a9662efe" title="vector of vector to store the entry information of component for each row and column">line</a>);<span class="comment"></span>
<a name="l00240"></a>00240 <span class="comment">  //////// nullify ////////</span>
<a name="l00241"></a>00241 <span class="comment"></span>  mat.<a class="code" href="classzhsmatrix.html#a260c143b946312f5a5581970e3b43f5d" title="matrix column size">n</a> =0;
<a name="l00242"></a>00242   <span class="keywordflow">return</span> newmat;
<a name="l00243"></a>00243 }
<a name="l00244"></a>00244 <span class="comment"></span>
<a name="l00245"></a>00245 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00246"></a>00246 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00247"></a>00247 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00248"></a>00248 <span class="comment"></span>
<a name="l00249"></a>00249 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00250"></a>00250 <span class="comment">/*! health checkup */</span>
<a name="l00251"></a><a class="code" href="classzhsmatrix.html#a751d30eacad96d62a1c28000f9cb37c4">00251</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classzhsmatrix.html#a751d30eacad96d62a1c28000f9cb37c4">zhsmatrix::checkup</a>()
<a name="l00252"></a>00252 {VERBOSE_REPORT;<span class="comment"></span>
<a name="l00253"></a>00253 <span class="comment">  //////// complex diagonal ////////</span>
<a name="l00254"></a>00254 <span class="comment"></span>  <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>=0; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>&lt;<a class="code" href="classzhsmatrix.html#ad01f0f8b364916b88d72c0e08b45815e" title="matrix row size">m</a>; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00255"></a>00255     <span class="keywordflow">if</span>( std::fabs((*<span class="keyword">this</span>)(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>).<a class="code" href="dcovector__small-specialized_8hpp.html#a2eb38711e1c30cc070f53589d1905fea">imag</a>()) &gt; DBL_MIN ){
<a name="l00256"></a>00256       ERROR_REPORT;
<a name="l00257"></a>00257       std::cerr &lt;&lt; <span class="stringliteral">&quot;Diagonal components of a Hermitian matrix have to be real numbers.&quot;</span> &lt;&lt; std::endl
<a name="l00258"></a>00258                 &lt;&lt; <span class="stringliteral">&quot;(*this)(&quot;</span> &lt;&lt; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a> &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a> &lt;&lt; <span class="stringliteral">&quot;) was a complex number, &quot;</span> &lt;&lt; (*this)(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>) &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl;
<a name="l00259"></a>00259       exit(1);
<a name="l00260"></a>00260     }
<a name="l00261"></a>00261   }
<a name="l00262"></a>00262   <span class="comment"></span>
<a name="l00263"></a>00263 <span class="comment">  //////// NOTE ////////</span>
<a name="l00264"></a>00264 <span class="comment"></span>  std::cerr &lt;&lt; <span class="stringliteral">&quot;# [NOTE]@zhsmatrix::checkup(): This symmetric sparse matrix is fine.&quot;</span> &lt;&lt; std::endl;
<a name="l00265"></a>00265 }
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
