Location: PHPKode > scripts > Matrix new > classmatrix.html
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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"/>
<title>Matrix: matrix Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<div class="contents">
<h1>matrix Class Reference</h1><!-- doxytag: class="matrix" --><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a2b7f607d95bd2aeb66a382ff2df384c3">matrix</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#affe9d4aefde2cb757de40f82a7b02cef">eye</a> ($n, $m)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a79c38b5cfbfef859dd55420647243b97">zeros</a> ($n, $m)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a0666490de43dbf627a83651f60501e02">ones</a> ($n, $m)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#af51ef6e4f318faf605e2f992cf2ac898">random</a> ($n, $m)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#ada24c3ae599c84928815471cea1f00f0">set_data</a> ($numbers)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#ab5976d1ba325a739761c2eb6662f58a9">get_data</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a489c64712e7533be07608543664eca11">get_value</a> ($i, $j)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#af97ef82f0627c236e0dc563c674967b4">set_value</a> ($i, $j, $value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a976944884a9580b5dedf902ab134352f">get_num_rows</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a6c9cfb021e87654728a5a9414ac33fe2">get_num_columns</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#acd53b602974d106f03fe77545a5c347b">get_rows</a> ($start, $stop)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a0110882b0d8bb561233cdc9b2693f9d7">get_columns</a> ($start, $stop)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#af8e2660868a9c29123ed9e8e7fd2d4e8">set_rows</a> ($start, $stop, $block_matrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a7a6982956e7c471a3a7ad38e6de32401">set_columns</a> ($start, $stop, $block_matrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a1cc605d0fac82269ed63590c92da9ffc">delete_rows</a> ($start, $end)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a8003b820681a86c2bdce6743178ccd97">delete_columns</a> ($start, $end)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a0cfa9a494c12e75e4de62e69bebeff7e">utrig</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#ab500229ec7111fc9dde8adb950a7f71b">ltrig</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a9056fcafb4fc1ec658dc5201dfdf9f20">diag</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a23d908093043223ccdcdddbebc3c899e">size_eq</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a1548e6fdbd881269f1015c49ba9344f3">is_square</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#aaa98ffa03ec9ebb12965b94f45372dea">minus</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a960620d7e5ef2f2d3f4ee8c829b226e8">plus</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a677dea49a1dfe612191e805483442225">times</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#af7b11e267dd15128e4b7af50ff04af40">s_times</a> ($value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a8b997f96adbaf07016d1845bb0d58ba1">det</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#af1873615c1dc3b02098e7dc35a74f53e">minor_matrix</a> ($someMatrix, $column, $row)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a96bc788b04a6f6c812b611dbdea8839e">prime</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a6a20dcc8d11d2fafb19cd7593ef3b2fd">smoothe</a> ($tolerance)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#aadb2d118864f41e3ad7c102358a4a211">inv</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#af8ed86e711834c1a022cc61693b0c22b">p_times</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a9f5d13338e8bd3cb5457697e3188a690">p_div</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a53463a572eb3260127bf516df6d63a5f">mat_max</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a68fa603e167ac93c7ad7c7972c8e5673">mat_min</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a04049faacbf50ea88cd77cbd23ab77d1">gt</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#ab36446de487364b15a97a843db02d11b">gteq</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a4ed1ff4b89c1e6e07a2ea11fa8d9631e">lt</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a3c9fbd56db415e2ab619720b9c1d2b2d">lteq</a> ($someMatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#adce2d1b0fc342d86c949a3588b78ebe6">sum</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a1859f3857328e47f99b94a8c6604a3bc">mean</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a2d7c10daafd4107c37dfbc15f1c91e71">lu</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a0c0db76d19b5dfad5eb763787773ff97">print_matrix</a> ()</td></tr>
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a469f22e998f8e6426c41161d6d718ca5">$numbers</a> = array()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a61635063c46d04cc41b94288863f2978">$numColumns</a> = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmatrix.html#a421991d6ab7f46f80cc1b5492e0c236e">$numRows</a> = 0</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A class to perform operation on matrices.</p>
<p>Modified : 19/dec/2009 by Pier-André Bouchard St-Amant pabsta [at] econ.queensu.ca</p>
<p>Changes :</p>
<ul>
<li>Introduction of the PLU decomposition of square matrices (through <a class="el" href="classmatrix.html#a2d7c10daafd4107c37dfbc15f1c91e71">lu()</a> for users, and PLU internally)</li>
<li>Significant improvement in stability and speed for inversion and the computation of the determinant (based on the above).</li>
<li>The "matrix" constructor can now take one or three arguments. The two additionnal arguments are the number of rows and the number of columns.</li>
<li>Bug correction in many functions : dimensions where incorrect after many routines if a <a class="el" href="classmatrix.html">matrix</a> had a full column/row of zeros.</li>
<li>Corrections in "get_columns"</li>
<li>See the file "changes.php" for the whole history of changes.</li>
</ul>
<ul>
<li>Comments :<ul>
<li>All mathematical functions are written to ressemble paper algebra :<ul>
<li>AxB ==&gt; $A-&gt;times($B);</li>
<li>A-B ==&gt; $A-&gt;minus($B);</li>
<li>A^(-1) ==&gt; $A-&gt;<a class="el" href="classmatrix.html#aadb2d118864f41e3ad7c102358a4a211">inv()</a>;</li>
<li>A' ==&gt; $A-&gt;<a class="el" href="classmatrix.html#a96bc788b04a6f6c812b611dbdea8839e">prime()</a>;</li>
<li>det(A) ==&gt; $A-&gt;det($A);</li>
<li>etc.</li>
</ul>
</li>
<li>This restricts nested calls, but augment readability.</li>
<li>The algorithm for <a class="el" href="classmatrix.html">matrix</a> inversion is based on PLU decomposition. The algorithm performs relatively well numerically and requires an order of 2*n^2 xsizeof(doubles) of memory space.</li>
<li>Error messages are echoed to the standard output (likely to be your webpage) </li>
</ul>
</li>
</ul>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8003b820681a86c2bdce6743178ccd97"></a><!-- doxytag: member="matrix::delete_columns" ref="a8003b820681a86c2bdce6743178ccd97" args="($start, $end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">delete_columns </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>end</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Delete some columns of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Deletes the columns specified in the inclusive range of $start and $stop.</p>
<p>Pre-requisite : $start and $stop must be inclusiveley between one an the number of columns of this <a class="el" href="classmatrix.html">matrix</a>. If not, an error message will be echoed to the standard output. If there is an error, no values will be changed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$start, int $stop the range of the columns to be deleted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1cc605d0fac82269ed63590c92da9ffc"></a><!-- doxytag: member="matrix::delete_rows" ref="a1cc605d0fac82269ed63590c92da9ffc" args="($start, $end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">delete_rows </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>end</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Delete some rows of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Deletes the rows specified in the inclusive range of $start and $stop.</p>
<p>Pre-requisite : $start and $stop must be inclusiveley between one an the number of columns of this <a class="el" href="classmatrix.html">matrix</a>. If not, an error message will be echoed to the standard output. If there is an error, no values will be changed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$start, int $stop the range of rows to be deleted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8b997f96adbaf07016d1845bb0d58ba1"></a><!-- doxytag: member="matrix::det" ref="a8b997f96adbaf07016d1845bb0d58ba1" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">det </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compute the determinant of some <a class="el" href="classmatrix.html">matrix</a></p>
<p>Pre-requisite: the <a class="el" href="classmatrix.html">matrix</a> must be square</p>
<p>This function computes the determinant of the <a class="el" href="classmatrix.html">matrix</a> through a PLU decomposition. Hence, it computes the product of the main diagonal of the U <a class="el" href="classmatrix.html">matrix</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>int $the_determinant </dd></dl>

</div>
</div>
<a class="anchor" id="a9056fcafb4fc1ec658dc5201dfdf9f20"></a><!-- doxytag: member="matrix::diag" ref="a9056fcafb4fc1ec658dc5201dfdf9f20" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">diag </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Obtain the diagonal of the <a class="el" href="classmatrix.html">matrix</a> OR form a diagonal <a class="el" href="classmatrix.html">matrix</a> with a supplied vector.</p>
<p>Two possible usages :</p>
<ul>
<li>Without any arguments : Obtain the elements on the main diagonal of the <a class="el" href="classmatrix.html">matrix</a>.</li>
<li>With a vertical <a class="el" href="classmatrix.html">matrix</a> argument : Form a <a class="el" href="classmatrix.html">matrix</a> with the vertical <a class="el" href="classmatrix.html">matrix</a> on the diagonal.</li>
</ul>
<p>If any other number of arguments is supplied, the function will echo an error message.</p>
<p>Pre-requisite :</p>
<ul>
<li>Without any arguments : the <a class="el" href="classmatrix.html">matrix</a> must be square</li>
<li>With a vertical <a class="el" href="classmatrix.html">matrix</a> argument : the parameter must be an 1 x n <a class="el" href="classmatrix.html">matrix</a> (a vertical <a class="el" href="classmatrix.html">matrix</a>).</li>
</ul>
<p>If the pre-requisites are not met, an error message will be echoed to the standard output.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><ul>
<li>Without any arguments : an n x 1 <a class="el" href="classmatrix.html">matrix</a> with the diagonal elements of this <a class="el" href="classmatrix.html">matrix</a>.<ul>
<li>With a vertical <a class="el" href="classmatrix.html">matrix</a> : a square <a class="el" href="classmatrix.html">matrix</a> with the 1 x n <a class="el" href="classmatrix.html">matrix</a> on the principal diagonal.</li>
<li>If any error, a 1 x 1 <a class="el" href="classmatrix.html">matrix</a> with a zero. </li>
</ul>
</li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="affe9d4aefde2cb757de40f82a7b02cef"></a><!-- doxytag: member="matrix::eye" ref="affe9d4aefde2cb757de40f82a7b02cef" args="($n, $m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">eye </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Quasi-constructor for an identity <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>Creates an $n x $m <a class="el" href="classmatrix.html">matrix</a> with ones on the main diagonal and zeros elsewhere.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$n, int $m the depth and width of the <a class="el" href="classmatrix.html">matrix</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a0110882b0d8bb561233cdc9b2693f9d7"></a><!-- doxytag: member="matrix::get_columns" ref="a0110882b0d8bb561233cdc9b2693f9d7" args="($start, $stop)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_columns </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>stop</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get some columns of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Returns a <a class="el" href="classmatrix.html">matrix</a> containing all the columns inclusively contained in the range $start to $stop.</p>
<p>Pre-requisite : $start and $stop must be inclusiveley between one an the number of columns of this <a class="el" href="classmatrix.html">matrix</a>. If not, an error message will be echoed to the standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$start, int $stop the range of requested rows </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> formed by the requested columns OR a 1x1 <a class="el" href="classmatrix.html">matrix</a> with a zero if there is an error in the range of requested columns. </dd></dl>

</div>
</div>
<a class="anchor" id="ab5976d1ba325a739761c2eb6662f58a9"></a><!-- doxytag: member="matrix::get_data" ref="ab5976d1ba325a739761c2eb6662f58a9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_data </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the all the numbers of the <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>Get the array of numbers of the <a class="el" href="classmatrix.html">matrix</a>, including zeros.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The array of numbers of the <a class="el" href="classmatrix.html">matrix</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a6c9cfb021e87654728a5a9414ac33fe2"></a><!-- doxytag: member="matrix::get_num_columns" ref="a6c9cfb021e87654728a5a9414ac33fe2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_num_columns </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the number of columns</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of columns of this <a class="el" href="classmatrix.html">matrix</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a976944884a9580b5dedf902ab134352f"></a><!-- doxytag: member="matrix::get_num_rows" ref="a976944884a9580b5dedf902ab134352f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_num_rows </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the number of rows.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of rows of this <a class="el" href="classmatrix.html">matrix</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="acd53b602974d106f03fe77545a5c347b"></a><!-- doxytag: member="matrix::get_rows" ref="acd53b602974d106f03fe77545a5c347b" args="($start, $stop)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_rows </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>stop</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get some rows of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Returns a <a class="el" href="classmatrix.html">matrix</a> containing all the rows inclusively contained in the range $start to $stop.</p>
<p>Pre-requisite : $start and $stop must be inclusiveley between one an the number of rows of this <a class="el" href="classmatrix.html">matrix</a>. If not, an error message will be echoed to the standard output</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$start, int $stop the range of requested rows </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> generated by those rows OR a 1x1 <a class="el" href="classmatrix.html">matrix</a> with a zero if there is an error in the range of requested rows. </dd></dl>

</div>
</div>
<a class="anchor" id="a489c64712e7533be07608543664eca11"></a><!-- doxytag: member="matrix::get_value" ref="a489c64712e7533be07608543664eca11" args="($i, $j)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">get_value </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>j</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get a particular element of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Pre-requisite : The values of $i and $j must be smaller than the dimensions (rows/columns). $i and $j are indexed from one. Hence get_value(1,1) returns the value of the first element (in the upper left corner). If the pre-requisite is not met, an error message will be echoed to the standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>:</em>&nbsp;</td><td>int $i, int $j the index of the particular element. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number requested OR zero if the parameters $i, $j are invalid. </dd></dl>

</div>
</div>
<a class="anchor" id="a04049faacbf50ea88cd77cbd23ab77d1"></a><!-- doxytag: member="matrix::gt" ref="a04049faacbf50ea88cd77cbd23ab77d1" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gt </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Element by element greater than comparison.</p>
<p>E.g. 1 if this_ij &gt; someMatrix_ij and 0 otherwise.</p>
<p>Pre-requiste : both matrices must have the same dimensions. Otherwise an error message is echoed to the standart output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classmatrix.html">matrix</a> of zeros and ones OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="ab36446de487364b15a97a843db02d11b"></a><!-- doxytag: member="matrix::gteq" ref="ab36446de487364b15a97a843db02d11b" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gteq </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Element by element greater than or equal comparison.</p>
<p>E.g. 1 if this_ij &gt;= someMatrix_ij and 0 otherwise.</p>
<p>Pre-requiste : both matrices must have the same dimensions. Otherwise an error message is echoed to the standart output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classmatrix.html">matrix</a> of zeros and ones OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="aadb2d118864f41e3ad7c102358a4a211"></a><!-- doxytag: member="matrix::inv" ref="aadb2d118864f41e3ad7c102358a4a211" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">inv </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compute the inverse of this <a class="el" href="classmatrix.html">matrix</a></p>
<p>This is done in a few steps :</p>
<ul>
<li>Find the PLU decomposition of the <a class="el" href="classmatrix.html">matrix</a>. That is find P, L and U where P is a permutation <a class="el" href="classmatrix.html">matrix</a>, L is a lower diagonal <a class="el" href="classmatrix.html">matrix</a> with ones on the diagonal and U is an upper triangular <a class="el" href="classmatrix.html">matrix</a> such that P*L*U is the original <a class="el" href="classmatrix.html">matrix</a>. (See the private function PLU)</li>
<li>Check if the determinant is non-null. An error is echoed to the standard output otherwise.</li>
<li>Perform the inversion of U, L, and P (which is much faster).</li>
</ul>
<p>Multiply the inverted results to find the inverse of the original <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>Pre-requisite : this <a class="el" href="classmatrix.html">matrix</a> is invertible.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The inverse <a class="el" href="classmatrix.html">matrix</a> OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="a1548e6fdbd881269f1015c49ba9344f3"></a><!-- doxytag: member="matrix::is_square" ref="a1548e6fdbd881269f1015c49ba9344f3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">is_square </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if a <a class="el" href="classmatrix.html">matrix</a> is square.</p>
<p>E.g. : if the number of rows is equal to the number of columns.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>bool true or false, depending on the result of the test. </dd></dl>

</div>
</div>
<a class="anchor" id="a4ed1ff4b89c1e6e07a2ea11fa8d9631e"></a><!-- doxytag: member="matrix::lt" ref="a4ed1ff4b89c1e6e07a2ea11fa8d9631e" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">lt </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Element by element less than comparison.</p>
<p>E.g. 1 if this_ij &lt; someMatrix_ij and 0 otherwise.</p>
<p>Pre-requiste : both matrices must have the same dimensions. Otherwise an error message is echoed to the standart output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classmatrix.html">matrix</a> of zeros and ones OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="a3c9fbd56db415e2ab619720b9c1d2b2d"></a><!-- doxytag: member="matrix::lteq" ref="a3c9fbd56db415e2ab619720b9c1d2b2d" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">lteq </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Element by element greater than comparison.</p>
<p>E.g. 1 if this_ij &lt;= someMatrix_ij and 0 otherwise.</p>
<p>Pre-requiste : both matrices must have the same dimensions. Otherwise an error message is echoed to the standart output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classmatrix.html">matrix</a> of zeros and ones OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="ab500229ec7111fc9dde8adb950a7f71b"></a><!-- doxytag: member="matrix::ltrig" ref="ab500229ec7111fc9dde8adb950a7f71b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ltrig </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Obtain the lower triangular part of this <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>This returns a <a class="el" href="classmatrix.html">matrix</a> with all the original numbers of the <a class="el" href="classmatrix.html">matrix</a> below the principal diagonal and with zeros elsewhere.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The lower diagonal <a class="el" href="classmatrix.html">matrix</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a2d7c10daafd4107c37dfbc15f1c91e71"></a><!-- doxytag: member="matrix::lu" ref="a2d7c10daafd4107c37dfbc15f1c91e71" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">lu </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Performs a PLU decomposition of this <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>Pre-requisite :this <a class="el" href="classmatrix.html">matrix</a> must be square. Otherwise an error message is echoed to the standard output.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>: A 2n x n <a class="el" href="classmatrix.html">matrix</a> where :<ul>
<li>the first n x n <a class="el" href="classmatrix.html">matrix</a> is the permutation <a class="el" href="classmatrix.html">matrix</a>.</li>
<li>the second n x n <a class="el" href="classmatrix.html">matrix</a> is the LU decomposition "stacked" where "ones" of the lower diagonal <a class="el" href="classmatrix.html">matrix</a> are omitted (by convention).</li>
</ul>
</dd></dl>
<p>Example : if the <a class="el" href="classmatrix.html">matrix</a> is the 3 x 3 :</p>
<p>2 1 1</p>
<p>1 2 1</p>
<p>1 1 2</p>
<p>The decomposition is then :</p>
<p>L:</p>
<p>1 0 0</p>
<p>1/2 1 0</p>
<p>1/2 4/3 1</p>
<p>U:</p>
<p>2 1 1</p>
<p>0 3/2 1/2</p>
<p>0 0 4/3</p>
<p>P:</p>
<p>1 0 0</p>
<p>0 1 0</p>
<p>0 0 1</p>
<p>So the return <a class="el" href="classmatrix.html">matrix</a> will be :</p>
<p>1 0 0 2 1 1</p>
<p>0 1 0 1/2 3/2 1/2</p>
<p>0 0 1 1/2 4/3 1 </p>

</div>
</div>
<a class="anchor" id="a53463a572eb3260127bf516df6d63a5f"></a><!-- doxytag: member="matrix::mat_max" ref="a53463a572eb3260127bf516df6d63a5f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mat_max </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Finds the max of each column of this <a class="el" href="classmatrix.html">matrix</a></p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An 1 x m <a class="el" href="classmatrix.html">matrix</a> with the maximum of each columns. </dd></dl>

</div>
</div>
<a class="anchor" id="a68fa603e167ac93c7ad7c7972c8e5673"></a><!-- doxytag: member="matrix::mat_min" ref="a68fa603e167ac93c7ad7c7972c8e5673" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mat_min </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compute the min of each column of this <a class="el" href="classmatrix.html">matrix</a></p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An 1 x m <a class="el" href="classmatrix.html">matrix</a> with the minimum of each columns. </dd></dl>

</div>
</div>
<a class="anchor" id="a2b7f607d95bd2aeb66a382ff2df384c3"></a><!-- doxytag: member="matrix::matrix" ref="a2b7f607d95bd2aeb66a382ff2df384c3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classmatrix.html">matrix</a> </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Class contructor.</p>
<p>The constructor either take one or three arguments. With only one argument, the arrow of numbers, the constructor sets the dimension of the <a class="el" href="classmatrix.html">matrix</a> as the dimensions of the array. In the three argument version, the constructor sets the dimension to those specified. This may be necessary since some columns/rows full of zeros may not be returned by some internal computations. This may also be useful to creat a <a class="el" href="classmatrix.html">matrix</a> of zeros by the user.</p>
<p>If the number of rows and the number of columns are specified, those must be equal or greater than the actual number of rows ans columns of the array as otherwise, the constructor will set the array values.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>$numbers, [int $numRows, int $numColumns] the array of numbers and the dimensions of the <a class="el" href="classmatrix.html">matrix</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new <a class="el" href="classmatrix.html">matrix</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1859f3857328e47f99b94a8c6604a3bc"></a><!-- doxytag: member="matrix::mean" ref="a1859f3857328e47f99b94a8c6604a3bc" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mean </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compute the mean of each column.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An 1 x m <a class="el" href="classmatrix.html">matrix</a> with the mean of each column. </dd></dl>

</div>
</div>
<a class="anchor" id="af1873615c1dc3b02098e7dc35a74f53e"></a><!-- doxytag: member="matrix::minor_matrix" ref="af1873615c1dc3b02098e7dc35a74f53e" args="($someMatrix, $column, $row)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">minor_matrix </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>row</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Finds a minor <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>A "minor matrix" is the <a class="el" href="classmatrix.html">matrix</a> which corresponds to deleting a specified row and column of the original <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>Pre-requisite : the $column and $row values must be within the existing range of this <a class="el" href="classmatrix.html">matrix</a>. Otherwise, an error message will be echoed to the standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix, int $column, int $row that is, the <a class="el" href="classmatrix.html">matrix</a> from which we seek the minor <a class="el" href="classmatrix.html">matrix</a>, the column and the row to delete. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The minor <a class="el" href="classmatrix.html">matrix</a> OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="aaa98ffa03ec9ebb12965b94f45372dea"></a><!-- doxytag: member="matrix::minus" ref="aaa98ffa03ec9ebb12965b94f45372dea" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">minus </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Substract $someMatrix from this <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>A - B is $A-&gt;minus($B)</p>
<p>Pre-requisite: Both matrices must have the same size. If not, an error message will be echoed to standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix the <a class="el" href="classmatrix.html">matrix</a> to substract. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> resulting of the substraction OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="a0666490de43dbf627a83651f60501e02"></a><!-- doxytag: member="matrix::ones" ref="a0666490de43dbf627a83651f60501e02" args="($n, $m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ones </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Quasi-constructor of a <a class="el" href="classmatrix.html">matrix</a> of ones</p>
<p>Creates an $n x $m <a class="el" href="classmatrix.html">matrix</a> with ones everywhere.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$n, int $m the depth and width of the <a class="el" href="classmatrix.html">matrix</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9f5d13338e8bd3cb5457697e3188a690"></a><!-- doxytag: member="matrix::p_div" ref="a9f5d13338e8bd3cb5457697e3188a690" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">p_div </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compute element by element division</p>
<p>E.g. this_ij / someMatrix2_ij</p>
<p>Pre-requisites : both <a class="el" href="classmatrix.html">matrix</a> must have the same size and no elements of someMatrix is zero. Otherwise an error message is echoed to the standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix the <a class="el" href="classmatrix.html">matrix</a> of divisors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The element by element division <a class="el" href="classmatrix.html">matrix</a> OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisites are not met. </dd></dl>

</div>
</div>
<a class="anchor" id="af8ed86e711834c1a022cc61693b0c22b"></a><!-- doxytag: member="matrix::p_times" ref="af8ed86e711834c1a022cc61693b0c22b" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">p_times </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compute each element of this <a class="el" href="classmatrix.html">matrix</a> with each element of some <a class="el" href="classmatrix.html">matrix</a></p>
<p>E.g. this_ij * someMatrix_ij</p>
<p>Pre-requisite : both <a class="el" href="classmatrix.html">matrix</a> must have the same size. Otherwise, an error message is echoed to the standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix the <a class="el" href="classmatrix.html">matrix</a> used to perform the element by element multiplication. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The element by element product <a class="el" href="classmatrix.html">matrix</a> OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="a960620d7e5ef2f2d3f4ee8c829b226e8"></a><!-- doxytag: member="matrix::plus" ref="a960620d7e5ef2f2d3f4ee8c829b226e8" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">plus </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add $someMatrix to this <a class="el" href="classmatrix.html">matrix</a></p>
<p>A + B is $A-&gt;plus($B)</p>
<p>Pre-requisite: Both must have the same size. Otherwise, an error message is echoed to the standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix, the <a class="el" href="classmatrix.html">matrix</a> to add. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> resulting of the addition OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="a96bc788b04a6f6c812b611dbdea8839e"></a><!-- doxytag: member="matrix::prime" ref="a96bc788b04a6f6c812b611dbdea8839e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">prime </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compute the transpose of this <a class="el" href="classmatrix.html">matrix</a></p>
<p>E.g. : A_ij becomes A_ji</p>
<p>A' is $A-&gt;<a class="el" href="classmatrix.html#a96bc788b04a6f6c812b611dbdea8839e">prime()</a></p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The transposed <a class="el" href="classmatrix.html">matrix</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a0c0db76d19b5dfad5eb763787773ff97"></a><!-- doxytag: member="matrix::print_matrix" ref="a0c0db76d19b5dfad5eb763787773ff97" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">print_matrix </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Prints the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Prints the <a class="el" href="classmatrix.html">matrix</a> in an ugly table with borders in the standard output. This is intended for debugging purpose. </p>

</div>
</div>
<a class="anchor" id="af51ef6e4f318faf605e2f992cf2ac898"></a><!-- doxytag: member="matrix::random" ref="af51ef6e4f318faf605e2f992cf2ac898" args="($n, $m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">random </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Quasi-constructor of a <a class="el" href="classmatrix.html">matrix</a> of random numbers</p>
<p>Creates an $n x $m <a class="el" href="classmatrix.html">matrix</a> with random numbers. The numbers are taken from the inside PHP random number generator and normalised so to have a uniform distribution.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$n, int $m the depth and width of the <a class="el" href="classmatrix.html">matrix</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af7b11e267dd15128e4b7af50ff04af40"></a><!-- doxytag: member="matrix::s_times" ref="af7b11e267dd15128e4b7af50ff04af40" args="($value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s_times </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>value</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Multiply this <a class="el" href="classmatrix.html">matrix</a> by some scalar.</p>
<p>A x scalar is $A-&gt;s_times($scalar)</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>double</em>&nbsp;</td><td>$value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7a6982956e7c471a3a7ad38e6de32401"></a><!-- doxytag: member="matrix::set_columns" ref="a7a6982956e7c471a3a7ad38e6de32401" args="($start, $stop, $block_matrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">set_columns </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>block_matrix</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Replace some columns of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Changes the columns specified in the inclusive range of $start and $stop by $bloc_matrix</p>
<p>Pre-requisite : $start and $stop must be inclusiveley between one an the number of columns of this <a class="el" href="classmatrix.html">matrix</a>. If not, an error message will be echoed to the standard output. If there is an error, no values will be changed.</p>
<p>Note that no requirements are necessary on $block_matrix. If it is smaller in any dimension, this will be interpreted as filling the missing values with zeros. If the <a class="el" href="classmatrix.html">matrix</a> is bigger, only the necessary values will be taken, starting from the upper-left corner.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$start, int $stop, <a class="el" href="classmatrix.html">matrix</a> $block_matrix the range and the <a class="el" href="classmatrix.html">matrix</a> to use for modifications. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ada24c3ae599c84928815471cea1f00f0"></a><!-- doxytag: member="matrix::set_data" ref="ada24c3ae599c84928815471cea1f00f0" args="($numbers)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">set_data </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>numbers</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set all the numbers of this <a class="el" href="classmatrix.html">matrix</a> This changes the actual numbers of this <a class="el" href="classmatrix.html">matrix</a> to the specified arguments. The dimensions of the <a class="el" href="classmatrix.html">matrix</a> are changed to those of the array passed as an argument.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>$numbers the numbers of the <a class="el" href="classmatrix.html">matrix</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af8e2660868a9c29123ed9e8e7fd2d4e8"></a><!-- doxytag: member="matrix::set_rows" ref="af8e2660868a9c29123ed9e8e7fd2d4e8" args="($start, $stop, $block_matrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">set_rows </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>block_matrix</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Replace some rows of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Changes the rows specified in the inclusive range of $start and $stop by $bloc_matrix</p>
<p>Pre-requisite : $start and $stop must be inclusiveley between one an the number of columns of this <a class="el" href="classmatrix.html">matrix</a>. If not, an error message will be echoed to the standard output. If there is an error, no values will be changed.</p>
<p>Note that no requirements are necessary on $block_matrix. If it is smaller in any dimension, this will be interpreted as filling the missing values with zeros. If the <a class="el" href="classmatrix.html">matrix</a> is bigger, only the necessary values will be taken, starting from the upper-left corner.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$start, int $stop, <a class="el" href="classmatrix.html">matrix</a> $block_matrix the range and the <a class="el" href="classmatrix.html">matrix</a> to use for modifications. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af97ef82f0627c236e0dc563c674967b4"></a><!-- doxytag: member="matrix::set_value" ref="af97ef82f0627c236e0dc563c674967b4" args="($i, $j, $value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">set_value </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>j</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set a particular element of the <a class="el" href="classmatrix.html">matrix</a></p>
<p>Pre-requisite : The values of $i and $j must be smaller than the dimensions (rows/columns). $i and $j are indexed from one. Hence set_value(1,1, 0) sets the value of the first element (in the upper left corner) to zero. If the pre-requisite is not met, an error message will be echoed to the standard output.</p>
<p>If there is an error in indexes, no value will be changed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>:</em>&nbsp;</td><td>int $i, int $j, double $value the coordinates of the element and the new value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a23d908093043223ccdcdddbebc3c899e"></a><!-- doxytag: member="matrix::size_eq" ref="a23d908093043223ccdcdddbebc3c899e" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_eq </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if two matrices are of the same size.</p>
<p>E.g. : checks if they both have the same number of rows and columns.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classmatrix.html">matrix</a></em>&nbsp;</td><td>$someMatrix the <a class="el" href="classmatrix.html">matrix</a> to compare with this <a class="el" href="classmatrix.html">matrix</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>bool true or false depending on if they are of the same size or not. </dd></dl>

</div>
</div>
<a class="anchor" id="a6a20dcc8d11d2fafb19cd7593ef3b2fd"></a><!-- doxytag: member="matrix::smoothe" ref="a6a20dcc8d11d2fafb19cd7593ef3b2fd" args="($tolerance)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">smoothe </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>tolerance</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Smoothe the elements of this <a class="el" href="classmatrix.html">matrix</a> to zero</p>
<p>All elements within (-$tolerance, $tolerance) are set to zero.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>:</em>&nbsp;</td><td>$tolerance </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="adce2d1b0fc342d86c949a3588b78ebe6"></a><!-- doxytag: member="matrix::sum" ref="adce2d1b0fc342d86c949a3588b78ebe6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sum </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the sum of each column.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An 1 x m <a class="el" href="classmatrix.html">matrix</a> with the sum of each column. </dd></dl>

</div>
</div>
<a class="anchor" id="a677dea49a1dfe612191e805483442225"></a><!-- doxytag: member="matrix::times" ref="a677dea49a1dfe612191e805483442225" args="($someMatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">times </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>someMatrix</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Multiply this <a class="el" href="classmatrix.html">matrix</a> by $someMatrix</p>
<p>A x B is $A-&gt;times($B)</p>
<p>Pre-requiste : the number of columns of this <a class="el" href="classmatrix.html">matrix</a> $this must equal the number of rows of $someMatrix. Otherwise, an error message is echoed to the standard output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>numbers</em>&nbsp;</td><td>$someMatrix the <a class="el" href="classmatrix.html">matrix</a> to multiply. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The result of the <a class="el" href="classmatrix.html">matrix</a> product OR a <a class="el" href="classmatrix.html">matrix</a> of zeros if the pre-requisite is not met. </dd></dl>

</div>
</div>
<a class="anchor" id="a0cfa9a494c12e75e4de62e69bebeff7e"></a><!-- doxytag: member="matrix::utrig" ref="a0cfa9a494c12e75e4de62e69bebeff7e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">utrig </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Obtain the upper triangular part of this <a class="el" href="classmatrix.html">matrix</a>.</p>
<p>This returns a <a class="el" href="classmatrix.html">matrix</a> with all the original numbers of the <a class="el" href="classmatrix.html">matrix</a> above the principal diagonal and with zeros elsewhere.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The upper diagonal <a class="el" href="classmatrix.html">matrix</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a79c38b5cfbfef859dd55420647243b97"></a><!-- doxytag: member="matrix::zeros" ref="a79c38b5cfbfef859dd55420647243b97" args="($n, $m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">zeros </td>
          <td>(</td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&nbsp;</td>
          <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Quasi-constructor of a <a class="el" href="classmatrix.html">matrix</a> of zeros.</p>
<p>Creates an $n x $m <a class="el" href="classmatrix.html">matrix</a> with zeros everywhere.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td>$n, int $m the depth and width of the <a class="el" href="classmatrix.html">matrix</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classmatrix.html">matrix</a> </dd></dl>

</div>
</div>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="a469f22e998f8e6426c41161d6d718ca5"></a><!-- doxytag: member="matrix::$numbers" ref="a469f22e998f8e6426c41161d6d718ca5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$numbers = array()</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The array containing the numbers of the <a class="el" href="classmatrix.html">matrix</a>. $numbers[$i][$j] is a two dimensional array where $i represents the depth and $j the width. Hence, $numbers[$i] returns one row of the <a class="el" href="classmatrix.html">matrix</a>. As a convention, zeros are not stored in the array. Thus, the dimension of the array is not necessarely the dimension of the <a class="el" href="classmatrix.html">matrix</a>. </p>

</div>
</div>
<a class="anchor" id="a61635063c46d04cc41b94288863f2978"></a><!-- doxytag: member="matrix::$numColumns" ref="a61635063c46d04cc41b94288863f2978" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$numColumns = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The number of columns in this <a class="el" href="classmatrix.html">matrix</a>. </p>

</div>
</div>
<a class="anchor" id="a421991d6ab7f46f80cc1b5492e0c236e"></a><!-- doxytag: member="matrix::$numRows" ref="a421991d6ab7f46f80cc1b5492e0c236e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$numRows = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The number of rows in this <a class="el" href="classmatrix.html">matrix</a>. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/matrix/matrix.php</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">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Variables</a></div>

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

<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Dec 20 04:44:55 2009 for Matrix by&nbsp;
<a href="http://www.doxygen.org/index.html">
doxygen 1.6.1</address>
</body>
</html>
Return current item: Matrix new