<!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: dgbmatrix-_dgbmatrix.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_67de7f372147e23eb4174da2848df429.html">dgbmatrix-</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">dgbmatrix-_dgbmatrix.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="dgbmatrix-__dgbmatrix_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">/*! dgbmatrix=_dgbmatrix operator */</span>
<a name="l00003"></a><a class="code" href="classdgbmatrix.html#aa237562b6322deac9935fcb8b68dcd86">00003</a> <span class="keyword">inline</span> <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a>&amp; <a class="code" href="classdgbmatrix.html#ac1e72f743cdeb2b2d27a63fb54bfd16a">dgbmatrix::operator=</a>(<span class="keyword">const</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a>&amp; mat)
<a name="l00004"></a>00004 {VERBOSE_REPORT;
<a name="l00005"></a>00005   <a class="code" href="classdgbmatrix.html#a04cc4d842f26e2b122e85877c913c1dc">shallow_copy</a>(mat);
<a name="l00006"></a>00006   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00007"></a>00007 }
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00010"></a>00010 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00011"></a>00011 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">/*! dgbmatrix+=_dgbmatrix operator\n</span>
<a name="l00015"></a>00015 <span class="comment">  If the band width of the left side matrix is narrower than the right side matrix, the band width of the left side matrix become thicker as same as the right side matrix. */</span>
<a name="l00016"></a><a class="code" href="classdgbmatrix.html#aa40a8bd63ef51b9c3235468aa6e182f1">00016</a> <span class="keyword">inline</span> <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a>&amp; <a class="code" href="classdgbmatrix.html#aa6e4759df46077a8512f5aa9a2162c4e">dgbmatrix::operator+=</a>(<span class="keyword">const</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a>&amp; mat)
<a name="l00017"></a>00017 {VERBOSE_REPORT;
<a name="l00018"></a>00018 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>  <span class="keywordflow">if</span>(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>!=mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> || <a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>!=mat.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>){
<a name="l00020"></a>00020     ERROR_REPORT;
<a name="l00021"></a>00021     std::cerr &lt;&lt; <span class="stringliteral">&quot;These two matrises can not make a summation.&quot;</span> &lt;&lt; std::endl
<a name="l00022"></a>00022               &lt;&lt; <span class="stringliteral">&quot;Your input was&quot;</span> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; <a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a> &lt;&lt;<span class="stringliteral">&quot;x&quot;</span>&lt;&lt; <a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a> &lt;&lt;<span class="stringliteral">&quot;,&quot;</span>&lt;&lt; <a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a> &lt;&lt;<span class="stringliteral">&quot;:&quot;</span>&lt;&lt; <a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a> &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>&lt;&lt; <span class="stringliteral">&quot;+=&quot;</span> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a> &lt;&lt;<span class="stringliteral">&quot;x&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> &lt;&lt;<span class="stringliteral">&quot;,&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a> &lt;&lt;<span class="stringliteral">&quot;:&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a> &lt;&lt;<span class="stringliteral">&quot;) &quot;</span> &lt;&lt; std::endl;
<a name="l00023"></a>00023     exit(1);
<a name="l00024"></a>00024   }
<a name="l00025"></a>00025 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>  
<a name="l00027"></a>00027   <span class="keywordflow">if</span>(<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>&gt;=mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a> &amp;&amp; <a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>&gt;=mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>){
<a name="l00028"></a>00028     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>=0; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>&lt;<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>++){
<a name="l00029"></a>00029       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>); j&lt;std::min(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>+1); j++){
<a name="l00030"></a>00030         <a class="code" href="classdgbmatrix.html#a1de0cb1230e2dd683f7e3d38a1560e79">operator()</a>(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j)+=mat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j);
<a name="l00031"></a>00031       }
<a name="l00032"></a>00032     }
<a name="l00033"></a>00033     
<a name="l00034"></a>00034     mat.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00035"></a>00035     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00036"></a>00036   }
<a name="l00037"></a>00037   <span class="keywordflow">else</span>{
<a name="l00038"></a>00038     <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a> newmat(<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>,<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,std::max(<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>,mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>),std::max(<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>,mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>));
<a name="l00039"></a>00039     newmat.<a class="code" href="classdgbmatrix.html#a588f21fb4a5055f33b7baa6a3bf912b7">zero</a>();
<a name="l00040"></a>00040     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>=0; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>&lt;<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>++){
<a name="l00041"></a>00041       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>); j&lt;std::min(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1); j++){
<a name="l00042"></a>00042         newmat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j)+=<a class="code" href="classdgbmatrix.html#a1de0cb1230e2dd683f7e3d38a1560e79">operator()</a>(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j);
<a name="l00043"></a>00043       }
<a name="l00044"></a>00044       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>); j&lt;std::min(mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>+1); j++){
<a name="l00045"></a>00045         newmat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j)+=mat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j);
<a name="l00046"></a>00046       }
<a name="l00047"></a>00047     }
<a name="l00048"></a>00048     
<a name="l00049"></a>00049     <a class="code" href="classdgbmatrix.html#a6b97772f3dec963a7745ad448c3919a5">swap</a>(*<span class="keyword">this</span>,newmat);
<a name="l00050"></a>00050     mat.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00051"></a>00051     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00052"></a>00052   }
<a name="l00053"></a>00053 }
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00056"></a>00056 <span class="comment">/*! dgbmatrix-=_dgbmatrix operator\n</span>
<a name="l00057"></a>00057 <span class="comment">  If the band width of the left side matrix is narrower than the right side matrix, the band width of the left side matrix become thicker as same as the right side matrix. */</span>
<a name="l00058"></a><a class="code" href="classdgbmatrix.html#a7834a2626cadfa6157773ba34ab8e2c5">00058</a> <span class="keyword">inline</span> <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a>&amp; <a class="code" href="classdgbmatrix.html#a8af0b73dd66973e0d91d042513c34d90">dgbmatrix::operator-=</a>(<span class="keyword">const</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a>&amp; mat)
<a name="l00059"></a>00059 {VERBOSE_REPORT;
<a name="l00060"></a>00060 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>  <span class="keywordflow">if</span>(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>!=mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> || <a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>!=mat.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>){
<a name="l00062"></a>00062     ERROR_REPORT;
<a name="l00063"></a>00063     std::cerr &lt;&lt; <span class="stringliteral">&quot;These two matrises can not make a subtraction.&quot;</span> &lt;&lt; std::endl
<a name="l00064"></a>00064               &lt;&lt; <span class="stringliteral">&quot;Your input was&quot;</span> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; <a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a> &lt;&lt;<span class="stringliteral">&quot;x&quot;</span>&lt;&lt; <a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a> &lt;&lt;<span class="stringliteral">&quot;,&quot;</span>&lt;&lt; <a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a> &lt;&lt;<span class="stringliteral">&quot;:&quot;</span>&lt;&lt; <a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a> &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>&lt;&lt; <span class="stringliteral">&quot;-=&quot;</span> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a> &lt;&lt;<span class="stringliteral">&quot;x&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> &lt;&lt;<span class="stringliteral">&quot;,&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a> &lt;&lt;<span class="stringliteral">&quot;:&quot;</span>&lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a> &lt;&lt;<span class="stringliteral">&quot;) &quot;</span> &lt;&lt; std::endl;
<a name="l00065"></a>00065     exit(1);
<a name="l00066"></a>00066   }
<a name="l00067"></a>00067 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>  
<a name="l00069"></a>00069   <span class="keywordflow">if</span>(<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>&gt;=mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a> &amp;&amp; <a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>&gt;=mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>){
<a name="l00070"></a>00070     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>=0; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>&lt;<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>++){
<a name="l00071"></a>00071       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>); j&lt;std::min(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>+1); j++){
<a name="l00072"></a>00072         <a class="code" href="classdgbmatrix.html#a1de0cb1230e2dd683f7e3d38a1560e79">operator()</a>(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j)-=mat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j);
<a name="l00073"></a>00073       }
<a name="l00074"></a>00074     }
<a name="l00075"></a>00075     
<a name="l00076"></a>00076     mat.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00077"></a>00077     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00078"></a>00078   }
<a name="l00079"></a>00079   <span class="keywordflow">else</span>{
<a name="l00080"></a>00080     <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a> newmat(<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>,<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,std::max(<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>,mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>),std::max(<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>,mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>));
<a name="l00081"></a>00081     newmat.<a class="code" href="classdgbmatrix.html#a588f21fb4a5055f33b7baa6a3bf912b7">zero</a>();
<a name="l00082"></a>00082     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>=0; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>&lt;<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>++){
<a name="l00083"></a>00083       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>); j&lt;std::min(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1); j++){
<a name="l00084"></a>00084         newmat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j)+=<a class="code" href="classdgbmatrix.html#a1de0cb1230e2dd683f7e3d38a1560e79">operator()</a>(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j);
<a name="l00085"></a>00085       }
<a name="l00086"></a>00086       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>); j&lt;std::min(mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>+1); j++){
<a name="l00087"></a>00087         newmat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j)-=mat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j);
<a name="l00088"></a>00088       }
<a name="l00089"></a>00089     }
<a name="l00090"></a>00090     
<a name="l00091"></a>00091     <a class="code" href="classdgbmatrix.html#a6b97772f3dec963a7745ad448c3919a5">swap</a>(*<span class="keyword">this</span>,newmat);
<a name="l00092"></a>00092     mat.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00093"></a>00093     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00094"></a>00094   }
<a name="l00095"></a>00095 }
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">/*! dgbmatrix*=_dgbmatrix operator */</span>
<a name="l00099"></a><a class="code" href="classdgbmatrix.html#a4ee58ca69a115f4ab62a5c4f0fbc4129">00099</a> <span class="keyword">inline</span> <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a>&amp; <a class="code" href="classdgbmatrix.html#a03a1aa13a44e3610bfdbf2a2fa7d26d9">dgbmatrix::operator*=</a>(<span class="keyword">const</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a>&amp; mat)
<a name="l00100"></a>00100 {VERBOSE_REPORT;
<a name="l00101"></a>00101 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span>  <span class="keywordflow">if</span>(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>!=mat.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>){
<a name="l00103"></a>00103     ERROR_REPORT;
<a name="l00104"></a>00104     std::cerr &lt;&lt; <span class="stringliteral">&quot;These two matrises can not make a product.&quot;</span> &lt;&lt; std::endl
<a name="l00105"></a>00105               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; <a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; <a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;) * (&quot;</span> &lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00106"></a>00106     exit(1);
<a name="l00107"></a>00107   }
<a name="l00108"></a>00108 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span>  
<a name="l00110"></a>00110   <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a> newmat( <a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>, mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>, std::min(<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>+mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>, <a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>-1), std::min(<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>, mat.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>-1) );
<a name="l00111"></a>00111   newmat.<a class="code" href="classdgbmatrix.html#a588f21fb4a5055f33b7baa6a3bf912b7">zero</a>();
<a name="l00112"></a>00112   
<a name="l00113"></a>00113   <span class="keywordflow">for</span>(<span class="keywordtype">long</span> <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>=0; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>&lt;newmat.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>++){
<a name="l00114"></a>00114     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-newmat.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>); j&lt;std::min(newmat.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+newmat.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1); j++){
<a name="l00115"></a>00115       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> k=std::max( std::max(<span class="keywordtype">long</span>(0),<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>-<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>), std::max(<span class="keywordtype">long</span>(0),j-mat.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>) );
<a name="l00116"></a>00116           k&lt; std::min( std::min(<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>+<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1), std::min(mat.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>,j+mat.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>+1) ); k++){
<a name="l00117"></a>00117         newmat(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,j)+= <a class="code" href="classdgbmatrix.html#a1de0cb1230e2dd683f7e3d38a1560e79">operator()</a>(<a class="code" href="classdgbmatrix.html#a567371974ca5b8a153befe8dccd4e374">i</a>,k)*mat(k,j);
<a name="l00118"></a>00118       }
<a name="l00119"></a>00119     }
<a name="l00120"></a>00120   }
<a name="l00121"></a>00121   
<a name="l00122"></a>00122   <a class="code" href="classdgbmatrix.html#a6b97772f3dec963a7745ad448c3919a5">swap</a>(*<span class="keyword">this</span>,newmat);
<a name="l00123"></a>00123   mat.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00124"></a>00124   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126 <span class="comment"></span>
<a name="l00127"></a>00127 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00128"></a>00128 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00129"></a>00129 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00130"></a>00130 <span class="comment"></span>
<a name="l00131"></a>00131 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00132"></a>00132 <span class="comment">/*! dgbmatrix+_dgbmatrix operator */</span>
<a name="l00133"></a><a class="code" href="dgbmatrix-__dgbmatrix_8hpp.html#ab82bc0f1a48232b52a74982388be19aa">00133</a> <span class="keyword">inline</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a> <a class="code" href="__dcovector-__dcovector_8hpp.html#a5399e73542e1f1e50c06268e87c02381">operator+</a>(<span class="keyword">const</span> <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a>&amp; matA, <span class="keyword">const</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a>&amp; matB)
<a name="l00134"></a>00134 {VERBOSE_REPORT;
<a name="l00135"></a>00135 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00136"></a>00136 <span class="preprocessor"></span>  <span class="keywordflow">if</span>(matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>!=matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> || matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>!=matB.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>){
<a name="l00137"></a>00137     ERROR_REPORT;
<a name="l00138"></a>00138     std::cerr &lt;&lt; <span class="stringliteral">&quot;These two matrises can not make a summation.&quot;</span> &lt;&lt; std::endl
<a name="l00139"></a>00139               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;) + (&quot;</span> &lt;&lt; matB.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00140"></a>00140     exit(1);
<a name="l00141"></a>00141   }
<a name="l00142"></a>00142 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span>  
<a name="l00144"></a>00144   <span class="keywordflow">if</span>(matB.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>&gt;matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a> &amp;&amp; matB.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>&gt;matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>){
<a name="l00145"></a>00145     <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;matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00146"></a>00146       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>-matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>); j&lt;std::min(matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>+matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1); j++){
<a name="l00147"></a>00147         matB(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j)+=matA(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j);
<a name="l00148"></a>00148       }
<a name="l00149"></a>00149     }
<a name="l00150"></a>00150     
<a name="l00151"></a>00151     <span class="keywordflow">return</span> matB;
<a name="l00152"></a>00152   }
<a name="l00153"></a>00153   <span class="keywordflow">else</span>{
<a name="l00154"></a>00154     <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a> newmat(matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>,matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,std::max(matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>,matB.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>),std::max(matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>,matB.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>));
<a name="l00155"></a>00155     newmat.<a class="code" href="classdgbmatrix.html#a588f21fb4a5055f33b7baa6a3bf912b7">zero</a>();
<a name="l00156"></a>00156     
<a name="l00157"></a>00157     <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;matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00158"></a>00158       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>-matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>); j&lt;std::min(matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>+matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1); j++){
<a name="l00159"></a>00159         newmat(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j)+=matA(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j);
<a name="l00160"></a>00160       }
<a name="l00161"></a>00161       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>-matB.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>); j&lt;std::min(matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>+matB.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>+1); j++){
<a name="l00162"></a>00162         newmat(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j)+=matB(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j);
<a name="l00163"></a>00163       }
<a name="l00164"></a>00164     }
<a name="l00165"></a>00165     
<a name="l00166"></a>00166     matB.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00167"></a>00167     <span class="keywordflow">return</span> <a class="code" href="dcovector-misc_8hpp.html#a297beda6502b0d92c99576d2fb9548cb">_</a>(newmat);
<a name="l00168"></a>00168   }
<a name="l00169"></a>00169 }
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00172"></a>00172 <span class="comment">/*! dgbmatrix-_dgbmatrix operator */</span>
<a name="l00173"></a><a class="code" href="dgbmatrix-__dgbmatrix_8hpp.html#a501d713b83b5240c0a29a6706517aeb0">00173</a> <span class="keyword">inline</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a> <a class="code" href="__dcovector-__dcovector_8hpp.html#a9b7c07c3ed09be2e6cf93a42cf6a780e">operator-</a>(<span class="keyword">const</span> <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a>&amp; matA, <span class="keyword">const</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a>&amp; matB)
<a name="l00174"></a>00174 {VERBOSE_REPORT;
<a name="l00175"></a>00175 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00176"></a>00176 <span class="preprocessor"></span>  <span class="keywordflow">if</span>(matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>!=matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> || matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>!=matB.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>){
<a name="l00177"></a>00177     ERROR_REPORT;
<a name="l00178"></a>00178     std::cerr &lt;&lt; <span class="stringliteral">&quot;These two matrises can not make a subtraction.&quot;</span> &lt;&lt; std::endl
<a name="l00179"></a>00179               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;) - (&quot;</span> &lt;&lt; matB.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00180"></a>00180     exit(1);
<a name="l00181"></a>00181   }
<a name="l00182"></a>00182 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00183"></a>00183 <span class="preprocessor"></span>  
<a name="l00184"></a>00184   <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a> newmat(matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>,matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,std::max(matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>,matB.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>),std::max(matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>,matB.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>));
<a name="l00185"></a>00185   newmat.<a class="code" href="classdgbmatrix.html#a588f21fb4a5055f33b7baa6a3bf912b7">zero</a>();
<a name="l00186"></a>00186   
<a name="l00187"></a>00187   <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;matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00188"></a>00188     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>-matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>); j&lt;std::min(matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>+matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1); j++){
<a name="l00189"></a>00189       newmat(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j)+=matA(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j);
<a name="l00190"></a>00190     }
<a name="l00191"></a>00191     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>-matB.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>); j&lt;std::min(matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>+matB.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>+1); j++){
<a name="l00192"></a>00192       newmat(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j)-=matB(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j);
<a name="l00193"></a>00193     }
<a name="l00194"></a>00194   }
<a name="l00195"></a>00195   
<a name="l00196"></a>00196   matB.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00197"></a>00197   <span class="keywordflow">return</span> <a class="code" href="dcovector-misc_8hpp.html#a297beda6502b0d92c99576d2fb9548cb">_</a>(newmat);
<a name="l00198"></a>00198 }
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00201"></a>00201 <span class="comment">/*! dgbmatrix*_dgbmatrix operator */</span>
<a name="l00202"></a><a class="code" href="dgbmatrix-__dgbmatrix_8hpp.html#a896e3c7d425fb8f638deb7bfee56f26f">00202</a> <span class="keyword">inline</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a> <a class="code" href="__dcovector-__drovector_8hpp.html#a36e102e1f8cddbe23f35d1e8dc37e2a7">operator*</a>(<span class="keyword">const</span> <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a>&amp; matA, <span class="keyword">const</span> <a class="code" href="class__dgbmatrix.html" title="(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class">_dgbmatrix</a>&amp; matB)
<a name="l00203"></a>00203 {VERBOSE_REPORT;
<a name="l00204"></a>00204 <span class="preprocessor">#ifdef  CPPL_DEBUG</span>
<a name="l00205"></a>00205 <span class="preprocessor"></span>  <span class="keywordflow">if</span>(matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>!=matB.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>){
<a name="l00206"></a>00206     ERROR_REPORT;
<a name="l00207"></a>00207     std::cerr &lt;&lt; <span class="stringliteral">&quot;These two matrises can not make a product.&quot;</span> &lt;&lt; std::endl
<a name="l00208"></a>00208               &lt;&lt; <span class="stringliteral">&quot;Your input was (&quot;</span> &lt;&lt; matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;) * (&quot;</span> &lt;&lt; matB.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a> &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a> &lt;&lt; <span class="stringliteral">&quot;).&quot;</span> &lt;&lt; std::endl;
<a name="l00209"></a>00209     exit(1);
<a name="l00210"></a>00210   }
<a name="l00211"></a>00211 <span class="preprocessor">#endif//CPPL_DEBUG</span>
<a name="l00212"></a>00212 <span class="preprocessor"></span>  
<a name="l00213"></a>00213   <a class="code" href="classdgbmatrix.html" title="Real Double-precision General Band Matrix Class.">dgbmatrix</a> newmat( matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>, matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>, std::min(matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>+matB.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>,matA.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>-1), std::min(matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+matB.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>,matB.<a class="code" href="class__dgbmatrix.html#a95aebc7e2d4ea66b1b7a08e981df6971" title="matrix column size">n</a>-1) );
<a name="l00214"></a>00214   newmat.<a class="code" href="classdgbmatrix.html#a588f21fb4a5055f33b7baa6a3bf912b7">zero</a>();
<a name="l00215"></a>00215   
<a name="l00216"></a>00216   <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;newmat.<a class="code" href="classdgbmatrix.html#af8a3e6bc4557b151f0049b8224f54580" title="matrix row size">m</a>; <a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>++){
<a name="l00217"></a>00217     <span class="keywordflow">for</span>(<span class="keywordtype">long</span> j=std::max(<span class="keywordtype">long</span>(0),<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>-newmat.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>); j&lt;std::min(newmat.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>+newmat.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1); j++){
<a name="l00218"></a>00218       <span class="keywordflow">for</span>(<span class="keywordtype">long</span> k=std::max( std::max(<span class="keywordtype">long</span>(0),<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>-matA.<a class="code" href="classdgbmatrix.html#aeeb3e79431677905a4ece19c6616edd4" title="lower band width">kl</a>), std::max(<span class="keywordtype">long</span>(0),j-matB.<a class="code" href="class__dgbmatrix.html#a116dadc8ed5246ee0b4cd0a9fffc53ea" title="upper band width">ku</a>) );
<a name="l00219"></a>00219           k&lt; std::min( std::min(matA.<a class="code" href="classdgbmatrix.html#a5b6fe4d1cfa71161b09ecf0b59befd0e" title="matrix column size">n</a>,<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>+matA.<a class="code" href="classdgbmatrix.html#a0b4d519e95ddf780bf1151a42018d646" title="upper band width">ku</a>+1), std::min(matB.<a class="code" href="class__dgbmatrix.html#a587a07ecbbfc6bbdb0e05574ea6b088a" title="matrix row size">m</a>,j+matB.<a class="code" href="class__dgbmatrix.html#aeea4fdf76630ca1b51f93c5bed64662c" title="lower band width">kl</a>+1) ); k++){
<a name="l00220"></a>00220         newmat(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,j)+= matA(<a class="code" href="__dgbmatrix-calc_8hpp.html#af7c79b3740ba9c1d547f55ac94bc1258">i</a>,k)*matB(k,j);
<a name="l00221"></a>00221       }
<a name="l00222"></a>00222     }
<a name="l00223"></a>00223   }
<a name="l00224"></a>00224   
<a name="l00225"></a>00225   matB.<a class="code" href="class__dgbmatrix.html#a170fdd995797f5d394863105e658df9e">destroy</a>();
<a name="l00226"></a>00226   <span class="keywordflow">return</span> <a class="code" href="dcovector-misc_8hpp.html#a297beda6502b0d92c99576d2fb9548cb">_</a>(newmat);
<a name="l00227"></a>00227 }
</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>
