MagicSquareExample.html
9.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<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_com-tecnick-tcpdf.html">com-tecnick-tcpdf</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_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_Best_Fit.html">PHPExcel_Shared_Best_Fit</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_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 <a href="../__filesource/fsource_JAMA__PHPExcelSharedJAMAexamplesMagicSquareExample.php.html#a11">11</a>]<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 <a href="../__filesource/fsource_JAMA__PHPExcelSharedJAMAexamplesMagicSquareExample.php.html#a17">17</a>]</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 <a href="../__filesource/fsource_JAMA__PHPExcelSharedJAMAexamplesMagicSquareExample.php.html#a100">100</a>]</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 <a href="../__filesource/fsource_JAMA__PHPExcelSharedJAMAexamplesMagicSquareExample.php.html#a83">83</a>]</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 Sun, 27 Feb 2011 16:32:34 -0800 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html>