225 lines
9.3 KiB
HTML
225 lines
9.3 KiB
HTML
<html>
|
|
<head>
|
|
<title>Docs For Class MagicSquareExample</title>
|
|
<link rel="stylesheet" type="text/css" href="../media/style.css">
|
|
</head>
|
|
<body>
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
|
<tr>
|
|
<td class="header_top">JAMA</td>
|
|
</tr>
|
|
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
|
<tr>
|
|
<td class="header_menu">
|
|
|
|
|
|
[ <a href="../classtrees_JAMA.html" class="menu">class tree: JAMA</a> ]
|
|
[ <a href="../elementindex_JAMA.html" class="menu">index: JAMA</a> ]
|
|
[ <a href="../elementindex.html" class="menu">all elements</a> ]
|
|
</td>
|
|
</tr>
|
|
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
|
</table>
|
|
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
|
<tr valign="top">
|
|
<td width="200" class="menu">
|
|
<div id="todolist">
|
|
<p><a href="../todolist.html">Todo List</a></p>
|
|
</div>
|
|
<b>Packages:</b><br />
|
|
<a href="../li_PHPExcel.html">PHPExcel</a><br />
|
|
<a href="../li_JAMA.html">JAMA</a><br />
|
|
<a href="../li_Math_Stats.html">Math_Stats</a><br />
|
|
<a href="../li_PHPExcel_CachedObjectStorage.html">PHPExcel_CachedObjectStorage</a><br />
|
|
<a href="../li_PHPExcel_Calculation.html">PHPExcel_Calculation</a><br />
|
|
<a href="../li_PHPExcel_Cell.html">PHPExcel_Cell</a><br />
|
|
<a href="../li_PHPExcel_Chart.html">PHPExcel_Chart</a><br />
|
|
<a href="../li_PHPExcel_Chart_Renderer.html">PHPExcel_Chart_Renderer</a><br />
|
|
<a href="../li_PHPExcel_Reader.html">PHPExcel_Reader</a><br />
|
|
<a href="../li_PHPExcel_Reader_Excel5.html">PHPExcel_Reader_Excel5</a><br />
|
|
<a href="../li_PHPExcel_Reader_Excel2007.html">PHPExcel_Reader_Excel2007</a><br />
|
|
<a href="../li_PHPExcel_RichText.html">PHPExcel_RichText</a><br />
|
|
<a href="../li_PHPExcel_Settings.html">PHPExcel_Settings</a><br />
|
|
<a href="../li_PHPExcel_Shared.html">PHPExcel_Shared</a><br />
|
|
<a href="../li_PHPExcel_Shared_Escher.html">PHPExcel_Shared_Escher</a><br />
|
|
<a href="../li_PHPExcel_Shared_OLE.html">PHPExcel_Shared_OLE</a><br />
|
|
<a href="../li_PHPExcel_Shared_Trend.html">PHPExcel_Shared_Trend</a><br />
|
|
<a href="../li_PHPExcel_Shared_ZipArchive.html">PHPExcel_Shared_ZipArchive</a><br />
|
|
<a href="../li_PHPExcel_Style.html">PHPExcel_Style</a><br />
|
|
<a href="../li_PHPExcel_Worksheet.html">PHPExcel_Worksheet</a><br />
|
|
<a href="../li_PHPExcel_Worksheet_Drawing.html">PHPExcel_Worksheet_Drawing</a><br />
|
|
<a href="../li_PHPExcel_Writer.html">PHPExcel_Writer</a><br />
|
|
<a href="../li_PHPExcel_Writer_Excel5.html">PHPExcel_Writer_Excel5</a><br />
|
|
<a href="../li_PHPExcel_Writer_Excel2007.html">PHPExcel_Writer_Excel2007</a><br />
|
|
<br /><br />
|
|
<b>Files:</b><br />
|
|
<div class="package">
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---examples---benchmark.php.html"> benchmark.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---CholeskyDecomposition.php.html"> CholeskyDecomposition.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---EigenvalueDecomposition.php.html"> EigenvalueDecomposition.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---utils---Error.php.html"> Error.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---LUDecomposition.php.html"> LUDecomposition.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---examples---MagicSquareExample.php.html"> MagicSquareExample.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---utils---Maths.php.html"> Maths.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---Matrix.php.html"> Matrix.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---QRDecomposition.php.html"> QRDecomposition.php
|
|
</a><br>
|
|
<a href="../JAMA/_PHPExcel---Shared---JAMA---SingularValueDecomposition.php.html"> SingularValueDecomposition.php
|
|
</a><br>
|
|
</div><br />
|
|
|
|
|
|
<b>Classes:</b><br />
|
|
<div class="package">
|
|
<a href="../JAMA/Benchmark.html">Benchmark</a><br />
|
|
<a href="../JAMA/CholeskyDecomposition.html">CholeskyDecomposition</a><br />
|
|
<a href="../JAMA/EigenvalueDecomposition.html">EigenvalueDecomposition</a><br />
|
|
<a href="../JAMA/MagicSquareExample.html">MagicSquareExample</a><br />
|
|
<a href="../JAMA/PHPExcel_Shared_JAMA_LUDecomposition.html">PHPExcel_Shared_JAMA_LUDecomposition</a><br />
|
|
<a href="../JAMA/PHPExcel_Shared_JAMA_Matrix.html">PHPExcel_Shared_JAMA_Matrix</a><br />
|
|
<a href="../JAMA/PHPExcel_Shared_JAMA_QRDecomposition.html">PHPExcel_Shared_JAMA_QRDecomposition</a><br />
|
|
<a href="../JAMA/SingularValueDecomposition.html">SingularValueDecomposition</a><br />
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
|
|
|
<h1>Class: MagicSquareExample</h1>
|
|
Source Location: /PHPExcel/Shared/JAMA/examples/MagicSquareExample.php<br /><br />
|
|
|
|
|
|
<table width="100%" border="0">
|
|
<tr><td valign="top">
|
|
|
|
<h3><a href="#class_details">Class Overview</a></h3>
|
|
<pre></pre><br />
|
|
<div class="description">Example of use of Matrix Class, featuring magic squares.</div><br /><br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td valign="top">
|
|
<h3><a href="#class_methods">Methods</a></h3>
|
|
<ul>
|
|
<li><a href="../JAMA/MagicSquareExample.html#methodmagic">magic</a></li>
|
|
<li><a href="../JAMA/MagicSquareExample.html#methodmain">main</a></li>
|
|
<li><a href="../JAMA/MagicSquareExample.html#methodmicrotime_float">microtime_float</a></li>
|
|
</ul>
|
|
</td>
|
|
|
|
</tr></table>
|
|
<hr />
|
|
|
|
<table width="100%" border="0"><tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr></table>
|
|
<hr />
|
|
|
|
<a name="class_details"></a>
|
|
<h3>Class Details</h3>
|
|
<div class="tags">
|
|
[line 11]<br />
|
|
Example of use of Matrix Class, featuring magic squares.<br /><br /></div><br /><br />
|
|
<div class="top">[ <a href="#top">Top</a> ]</div><br />
|
|
|
|
|
|
<hr />
|
|
<a name="class_methods"></a>
|
|
<h3>Class Methods</h3>
|
|
<div class="tags">
|
|
|
|
<hr />
|
|
<a name="methodmagic"></a>
|
|
<h3>method magic <span class="smalllinenumber">[line 17]</span></h3>
|
|
<div class="function">
|
|
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
|
<code>void magic(
|
|
int
|
|
$n)</code>
|
|
</td></tr></table>
|
|
</td></tr></table><br />
|
|
|
|
Generate magic square test matrix.<br /><br /><br /><br />
|
|
|
|
|
|
<h4>Parameters:</h4>
|
|
<div class="tags">
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td class="type">int </td>
|
|
<td><b>$n</b> </td>
|
|
<td>n dimension of matrix</td>
|
|
</tr>
|
|
</table>
|
|
</div><br />
|
|
<div class="top">[ <a href="#top">Top</a> ]</div>
|
|
</div>
|
|
<hr />
|
|
<a name="methodmain"></a>
|
|
<h3>method main <span class="smalllinenumber">[line 100]</span></h3>
|
|
<div class="function">
|
|
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
|
<code>void main(
|
|
)</code>
|
|
</td></tr></table>
|
|
</td></tr></table><br />
|
|
|
|
Tests LU, QR, SVD and symmetric Eig decompositions.<br /><br /><p>n = order of magic square. trace = diagonal sum, should be the magic sum, (n^3 + n)/2. max_eig = maximum eigenvalue of (A + A')/2, should equal trace. rank = linear algebraic rank, should equal n if n is odd, be less than n if n is even. cond = L_2 condition number, ratio of singular values. lu_res = test of LU factorization, norm1(L*U-A(p,:))/(n*eps). qr_res = test of QR factorization, norm1(Q*R-A)/(n*eps).</p><br /><br /><br />
|
|
|
|
|
|
<div class="top">[ <a href="#top">Top</a> ]</div>
|
|
</div>
|
|
<hr />
|
|
<a name="methodmicrotime_float"></a>
|
|
<h3>method microtime_float <span class="smalllinenumber">[line 83]</span></h3>
|
|
<div class="function">
|
|
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
|
<code>void microtime_float(
|
|
)</code>
|
|
</td></tr></table>
|
|
</td></tr></table><br />
|
|
|
|
Simple function to replicate PHP 5 behaviour<br /><br /><br /><br />
|
|
|
|
|
|
<div class="top">[ <a href="#top">Top</a> ]</div>
|
|
</div>
|
|
</div><br />
|
|
|
|
|
|
<div class="credit">
|
|
<hr />
|
|
Documentation generated on Fri, 12 Oct 2012 00:16:40 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.4</a>
|
|
</div>
|
|
</td></tr></table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
</html> |