Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

initial import of Math::MatrixReal 2.02

  • Loading branch information...
commit f0a3499512a137241bad73ac93d2aaf90ed8338c 0 parents
authored October 19, 2007

Showing 78 changed files with 44,381 additions and 0 deletions. Show diff stats Hide diff stats

  1. 144  CHANGES
  2. 24  CREDITS
  3. 7  GOALS
  4. 248  Kleene.html
  5. 277  Kleene.pod
  6. 54  MANIFEST
  7. 809  Makefile
  8. 15  Makefile.PL
  9. BIN  Math-MatrixReal-2.02.tar.gz
  10. 5,443  MatrixReal.pm
  11. 166  README
  12. 95  TODO
  13. 0  arch/.exists b/blib/arch/.exists
  14. 0  arch/auto/Math/MatrixReal/.exists b/blib/arch/auto/Math/MatrixReal/.exists
  15. 0  bin/.exists b/blib/bin/.exists
  16. 277  blib/lib/Math/Kleene.pod
  17. 5,443  blib/lib/Math/MatrixReal.pm
  18. 78  blib/lib/Math/funcs.pl
  19. 371  blib/man3/Math__Kleene.3
  20. 2,335  blib/man3/Math__MatrixReal.3
  21. 78  funcs.pl
  22. 0  lib/Math/.exists b/blib/lib/Math/.exists
  23. 0  lib/auto/Math/MatrixReal/.exists b/blib/lib/auto/Math/MatrixReal/.exists
  24. 2,017  man.html
  25. 0  man1/.exists b/blib/man1/.exists
  26. 0  man3/.exists b/blib/man3/.exists
  27. 0  pm_to_blib
  28. 2  pod2htmd.tmp
  29. 2  pod2htmi.tmp
  30. 0  script/.exists b/blib/script/.exists
  31. 20  t/adjoint.t
  32. 27  t/arith.t
  33. 24  t/assign
  34. 137  t/basic.t
  35. 58  t/bench
  36. 142  t/bench_eigen.t
  37. 65  t/bench_eigen2.t
  38. 26  t/binary.t
  39. 42  t/bool.t
  40. 23  t/cofactor.t
  41. 13  t/condition.t
  42. 69  t/det.t
  43. 88  t/diag.t
  44. 75  t/div.t
  45. 23  t/divid
  46. 34  t/each.t
  47. 17  t/echelon
  48. 130  t/eigen_3x3.t
  49. 64  t/eigen_7x7.t
  50. 103  t/eigen_NxN.t
  51. 35  t/exponent.t
  52. 20  t/ext1.t
  53. 185  t/ext1_0_07.t
  54. 93  t/funcs.pl
  55. 42  t/gramian.t
  56. 37  t/inverse.t
  57. 26  t/is_LR.t
  58. 36  t/isrowcol.t
  59. 14  t/latex.t
  60. 14  t/matlab.t
  61. 18  t/minor.t
  62. 23  t/norm.t
  63. 25  t/orthogonal.t
  64. 22  t/periodic.t
  65. 27  t/product.t
  66. 31  t/quadratic.t
  67. 32  t/rank.t
  68. 10  t/scinotation.t
  69. 26  t/spectral.t
  70. 41  t/swap.t
  71. 54  t/symmetric.t
  72. 24,348  t/tmon.out
  73. 23  t/trace.t
  74. 17  t/transpose.t
  75. 50  t/triang.t
  76. 18  t/vecnorm.t
  77. 13  t/yacas.t
  78. 36  test_divide
144  CHANGES
... ...
@@ -0,0 +1,144 @@
  1
+Changes in v2.02 - leto
  2
+Sat Jun 09 12:29:08 EDT 2007 
  3
+----------------------------
  4
+    * Fixed the overloading for the division operator which did not recognize $a/2, reported
  5
+	by Daniel Brooks <db48x@yahoo.com>
  6
+    * Added support for matrix division notation, so that $a/$b = $a*$b**(-1) when $a and $b are square matrices
  7
+    * t/div.t created
  8
+
  9
+Changes in v2.01 - msouth
  10
+Fri Aug 19 23:40:24 EDT 2005
  11
+----------------------------
  12
+    * Changed versioning format to leading zero after the
  13
+      dot to make more minor versions possible this time
  14
+    * Integration of Math::MatrixReal::Ext1 0.07
  15
+        * merged new_from_cols and new_from_rows into one private
  16
+          function which is called by wrappers with the old
  17
+          names
  18
+        * added tests to exercise all of the known failure modes
  19
+          in new_from_{rows,cols} calls
  20
+    * Fixes for POD
  21
+        * added a much needed =over 4 to the start of the POD
  22
+        * removed tabs
  23
+    * reformatted indentation of the all of the code to 4 space
  24
+      indent (from a mixture of tabs, 8 space, 4 space, and 2 space)
  25
+
  26
+Changes in v1.9 - leto
  27
+Wed May 15 03:19:34 EST 2002 
  28
+----------------------------
  29
+	* as_yacas() function added
  30
+	* t/yacas.t created
  31
+	* Fixed issue with infinity norm and Irix, thanks to 
  32
+	  Allen Smith <easmith@beatrice.rutgers.edu> and the CPAN testers
  33
+
  34
+Changes in v1.8 -- leto
  35
+Sat Mar 23 00:13:48 EST 2002 
  36
+----------------------------
  37
+	* as_matlab() function added
  38
+	* as_scilab() function added
  39
+	* t/matlab.t created
  40
+	* is_row_vector() function added
  41
+	* is_col_vector() function added
  42
+	* t/isrowcol.t created
  43
+	* norm_p() function added
  44
+	* norm_frobenius () function added
  45
+	* t/vecnorm.t created
  46
+
  47
+
  48
+
  49
+Changes in v1.7 -- leto
  50
+Fri Mar 15 13:09:49 EST 2002 
  51
+---------------------------
  52
+	* each() and each_diag() are now one-based for consistency
  53
+	* removed _trace() comments
  54
+	* as_latex() function created
  55
+	* t/latex.t created
  56
+	* t/bool.t created
  57
+	* t/periodic.t created
  58
+	* t/rank.t created
  59
+	* new_from_string() shouldn't care about the case of the scientific E
  60
+		notation (pointed out by Jim Bowery <jim_bowery@hotmail.com>)
  61
+	* t/scinotation.t created
  62
+	* is_idempotent() function added
  63
+	* is_periodic() function added
  64
+	* rank_LR() function added
  65
+	* make is_orthogonal return 0 instead of croak when matrix
  66
+		is not quadratic
  67
+
  68
+Changes in v1.6 -- leto
  69
+Sat Feb 16 09:46:51 EST 2002 
  70
+-------------------------
  71
+	* is_skew_symmetric() function added
  72
+	* fixed logic error is sym_eigenvalues ( didn't notice if not square! )
  73
+	* spectral_radius() function added
  74
+	* is_binary() function added
  75
+	* is_LR() function added
  76
+	* t/spectral.t created
  77
+	* t/binary.t created
  78
+	* t/is_LR.t created
  79
+	* t/gramian.t created
  80
+	* is_skew_symmetric() tests added to t/symmetric.t
  81
+	* is_gramian() function added
  82
+
  83
+Changes in v1.5 -- leto
  84
+Sat Jan 12 04:20:48 EST 2002 
  85
+-------------------------
  86
+	* t/inverse.t test 6 was numerically instable, commented out
  87
+		I ran it 10000 times and got values from 1e-2 to 1e-16,
  88
+		this caused the test to randomly fail, because it checked
  89
+		that the value was less than 1e-10
  90
+		I did not notice this problem because my default perl install
  91
+		has USE_LONG_DOUBLE
  92
+	* changed epsilon to be 1e-8 in funcs.pl ( was 1e-10)
  93
+
  94
+Changes in v1.4 -- leto
  95
+Jan 10 2002
  96
+--------------------------
  97
+	* Steffen Beyer gave maintainer-ship to Jonathan Leto
  98
+	* exponent() function added
  99
+	* trace() function added
  100
+	* "**" and "**="  overloaded to exponent()
  101
+	* $matrix ** -1 is now a quick way to compute the inverse, if it exists
  102
+	* new_from_rows and new_from_cols integrated from Math::MatrixReal::Ext1
  103
+	* is_diagonal() function added
  104
+	* is_tridiagonal() function added
  105
+	* each() function added
  106
+	* each_diag() function added
  107
+	* put functions used by all the test scripts into funcs.pl instead
  108
+		of all of them having copy+paste code
  109
+	* t/inverse.t created 
  110
+	* t/diag.t created 
  111
+	* t/exponent.t created
  112
+	* t/trace.t created
  113
+	* t/ext1.t created
  114
+	* some documentation spelling errors corrected
  115
+	* perl operators exp(),sin(),cos() overloaded 
  116
+		only works with diagonal matrices for now
  117
+	* new_diag() function added
  118
+	* is_upper_triangular() function added
  119
+	* is_lower_triangular() function added
  120
+	* t/triang.t created
  121
+	* t/det.t created
  122
+	* inverse() function added
  123
+	* det() function added
  124
+		should be much faster for diagonal and triangular matrices
  125
+	* tri_diagonalize() tri_eigenvalues() and now do real tridiag check, as per TODO
  126
+	* t/minor.t created
  127
+	* t/cofactor.t created
  128
+	* t/adjoint.t created
  129
+	* t/quadratic.t created
  130
+	* norm_sum() function added
  131
+	* t/norm.t created
  132
+	* check if $rows and $cols are integers in new()
  133
+	* t/condition.t created
  134
+	* t/product.t created
  135
+	* eigenvalues() function added
  136
+	* t/eigen_NxN.t - added test for eigenvalues()
  137
+	* swap_row() function added
  138
+	* swap_col() function added
  139
+	* t/swap.t created
  140
+	* t/orthogonal.t created
  141
+	* is_orthogonal() function added
  142
+	
  143
+
  144
+	
24  CREDITS
... ...
@@ -0,0 +1,24 @@
  1
+Many people deserve recoginition for their help with Math::MatrixReal:
  2
+
  3
+* 	Many thanks to Steffen Beyer <sb@engelschall.com> himself for being very 
  4
+	open to third-party additions. (Of course, this acknowledgment is due to Rodolphe. :-)
  5
+	Steffen Beyer released the original Math::MatrixReal and maintained it
  6
+	until v1.3a5, then handed off to Jonathan Leto <jonathan@leto.net>.
  7
+
  8
+* 	Rodolphe Ortalo <ortalo@laas.fr> for many contributions.
  9
+
  10
+*	As always, many thanks to Andreas Koenig <andreas.koenig@mind.de>
  11
+	for his relentless support and efforts as upload manager of the CPAN!
  12
+
  13
+*	Also many thanks to Stu Smith <stu@cs.uml.edu> for raising the questions
  14
+	concerning the "new_from_string()" method (whose documentation was mis-
  15
+	leading and incomplete)!
  16
+
  17
+*	Mike South <msouth@fulcrum.org> for the new_from_cols() and new_from_rows() functions
  18
+	that were integrated from Math::MatrixReal::Ext1
  19
+
  20
+*	Everybody involved with CPAN Testers, thanks guys/gals!
  21
+
  22
+
  23
+Current Maintainer: Jonathan Leto <jonathan@leto.net>
  24
+
7  GOALS
... ...
@@ -0,0 +1,7 @@
  1
+
  2
+Some goals for Math::MatrixReal:
  3
+--------------------------------
  4
+
  5
+o Correctness is more important than speed
  6
+o Test all methods, at least once
  7
+
248  Kleene.html
... ...
@@ -0,0 +1,248 @@
  1
+<?xml version="1.0" ?>
  2
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3
+<html xmlns="http://www.w3.org/1999/xhtml">
  4
+<head>
  5
+<title>Algorithm - the theory behind it</title>
  6
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
  7
+<link rev="made" href="mailto:root@jail-99255.freebsd.org" />
  8
+</head>
  9
+
  10
+<body style="background-color: white">
  11
+
  12
+<p><a name="__index__"></a></p>
  13
+<!-- INDEX BEGIN -->
  14
+
  15
+<ul>
  16
+
  17
+	<li><a href="#name">NAME</a></li>
  18
+	<li><a href="#description">DESCRIPTION</a></li>
  19
+	<ul>
  20
+
  21
+		<li><a href="#semirings"><strong>Semi-Rings</strong></a></li>
  22
+		<li><a href="#operator____"><strong>Operator '*'</strong></a></li>
  23
+		<li><a href="#kleene_s_algorithm"><strong>Kleene's Algorithm</strong></a></li>
  24
+		<li><a href="#kleene_s_algorithm_and_semirings"><strong>Kleene's Algorithm and Semi-Rings</strong></a></li>
  25
+	</ul>
  26
+
  27
+	<li><a href="#see_also">SEE ALSO</a></li>
  28
+	<li><a href="#author">AUTHOR</a></li>
  29
+	<li><a href="#copyright">COPYRIGHT</a></li>
  30
+</ul>
  31
+<!-- INDEX END -->
  32
+
  33
+<hr />
  34
+<p>
  35
+</p>
  36
+<h1><a name="name">NAME</a></h1>
  37
+<p>Kleene's Algorithm - the theory behind it</p>
  38
+<p>brief introduction</p>
  39
+<p>
  40
+</p>
  41
+<hr />
  42
+<h1><a name="description">DESCRIPTION</a></h1>
  43
+<p>
  44
+</p>
  45
+<h2><a name="semirings"><strong>Semi-Rings</strong></a></h2>
  46
+<p>A Semi-Ring (S, +, ., 0, 1) is characterized by the following properties:</p>
  47
+<ol>
  48
+<li><strong><a name="item__29">)</a></strong>
  49
+
  50
+<p>a)  <code>(S, +, 0) is a Semi-Group with neutral element 0</code></p>
  51
+<p>b)  <code>(S, ., 1) is a Semi-Group with neutral element 1</code></p>
  52
+<p>c)  <code>0 . a = a . 0 = 0  for all a in S</code></p>
  53
+</li>
  54
+<li><strong>)</strong>
  55
+
  56
+<p><code>&quot;+&quot;</code> is commutative and <strong>idempotent</strong>, i.e., <code>a + a = a</code></p>
  57
+</li>
  58
+<li><strong>)</strong>
  59
+
  60
+<p>Distributivity holds, i.e.,</p>
  61
+<p>a)  <code>a . ( b + c ) = a . b + a . c  for all a,b,c in S</code></p>
  62
+<p>b)  <code>( a + b ) . c = a . c + b . c  for all a,b,c in S</code></p>
  63
+</li>
  64
+<li><strong>)</strong>
  65
+
  66
+<p><code>SUM_{i=0}^{+infinity} ( a[i] )</code></p>
  67
+<p>exists, is well-defined and unique</p>
  68
+<p><code>for all a[i] in S</code></p>
  69
+<p>and associativity, commutativity and idempotency hold</p>
  70
+</li>
  71
+<li><strong>)</strong>
  72
+
  73
+<p>Distributivity for infinite series also holds, i.e.,</p>
  74
+<pre>
  75
+  ( SUM_{i=0}^{+infty} a[i] ) . ( SUM_{j=0}^{+infty} b[j] )
  76
+  = SUM_{i=0}^{+infty} ( SUM_{j=0}^{+infty} ( a[i] . b[j] ) )</pre>
  77
+</li>
  78
+</ol>
  79
+<p>EXAMPLES:</p>
  80
+<ul>
  81
+<li>
  82
+<p><code>S1 = ({0,1}, |, &amp;, 0, 1)</code></p>
  83
+<p>Boolean Algebra</p>
  84
+<p>See also <a href="/Math/MatrixBool(3).html">the Math::MatrixBool(3) manpage</a></p>
  85
+</li>
  86
+<li>
  87
+<p><code>S2 = (pos. reals with 0 and +infty, min, +, +infty, 0)</code></p>
  88
+<p>Positive real numbers including zero and plus infinity</p>
  89
+<p>See also <a href="/Math/MatrixReal(3).html">the Math::MatrixReal(3) manpage</a></p>
  90
+</li>
  91
+<li>
  92
+<p><code>S3 = (Pot(Sigma*), union, concat, {}, {''})</code></p>
  93
+<p>Formal languages over Sigma (= alphabet)</p>
  94
+<p>See also <a href="/DFA/Kleene(3).html">the DFA::Kleene(3) manpage</a></p>
  95
+</li>
  96
+</ul>
  97
+<p>
  98
+</p>
  99
+<h2><a name="operator____"><strong>Operator '*'</strong></a></h2>
  100
+<p>(reflexive and transitive closure)</p>
  101
+<p>Define an operator called ``*'' as follows:</p>
  102
+<pre>
  103
+    a in S   ==&gt;   a*  :=  SUM_{i=0}^{+infty} a^i</pre>
  104
+<p>where</p>
  105
+<pre>
  106
+    a^0  =  1,   a^(i+1)  =  a . a^i</pre>
  107
+<p>Then, also</p>
  108
+<pre>
  109
+    a*  =  1 + a . a*,   0*  =  1*  =  1</pre>
  110
+<p>hold.</p>
  111
+<p>
  112
+</p>
  113
+<h2><a name="kleene_s_algorithm"><strong>Kleene's Algorithm</strong></a></h2>
  114
+<p>In its general form, Kleene's algorithm goes as follows:</p>
  115
+<pre>
  116
+    for i := 1 to n do
  117
+        for j := 1 to n do
  118
+        begin
  119
+            C^0[i,j] := m(v[i],v[j]);
  120
+            if (i = j) then C^0[i,j] := C^0[i,j] + 1
  121
+        end
  122
+    for k := 1 to n do
  123
+        for i := 1 to n do
  124
+            for j := 1 to n do
  125
+                C^k[i,j] := C^k-1[i,j] + 
  126
+                            C^k-1[i,k] . ( C^k-1[k,k] )* . C^k-1[k,j]
  127
+    for i := 1 to n do
  128
+        for j := 1 to n do
  129
+            c(v[i],v[j]) := C^n[i,j]</pre>
  130
+<p>
  131
+</p>
  132
+<h2><a name="kleene_s_algorithm_and_semirings"><strong>Kleene's Algorithm and Semi-Rings</strong></a></h2>
  133
+<p>Kleene's algorithm can be applied to any Semi-Ring having the properties
  134
+listed previously (above). (!)</p>
  135
+<p>EXAMPLES:</p>
  136
+<ul>
  137
+<li>
  138
+<p><code>S1 = ({0,1}, |, &amp;, 0, 1)</code></p>
  139
+<p><code>G(V,E)</code> be a graph with set of vortices V and set of edges E:</p>
  140
+<p><code>m(v[i],v[j])  :=  ( (v[i],v[j]) in E ) ? 1 : 0</code></p>
  141
+<p>Kleene's algorithm then calculates</p>
  142
+<p><code>c^{n}_{i,j} = ( path from v[i] to v[j] exists ) ? 1 : 0</code></p>
  143
+<p>using</p>
  144
+<p><code>C^k[i,j]  =  C^k-1[i,j]  |  C^k-1[i,k]  &amp;  C^k-1[k,j]</code></p>
  145
+<p>(remember <code> 0*  =  1*  =  1 </code>)</p>
  146
+</li>
  147
+<li>
  148
+<p><code>S2 = (pos. reals with 0 and +infty, min, +, +infty, 0)</code></p>
  149
+<p><code>G(V,E)</code> be a graph with set of vortices V and set of edges E, with
  150
+costs <code>m(v[i],v[j])</code> associated with each edge <code>(v[i],v[j])</code> in E:</p>
  151
+<p><code>m(v[i],v[j])  :=  costs of (v[i],v[j])</code></p>
  152
+<p><code>for all (v[i],v[j]) in E</code></p>
  153
+<p>Set <code>m(v[i],v[j]) := +infinity</code> if an edge (v[i],v[j]) is not in E.</p>
  154
+<p><code>  ==&gt;  a* = 0  for all a in S2</code></p>
  155
+<p><code>  ==&gt;  C^k[i,j]  =  min( C^k-1[i,j] ,</code></p>
  156
+<p><code>           C^k-1[i,k]  +  C^k-1[k,j] )</code></p>
  157
+<p>Kleene's algorithm then calculates the costs of the ``shortest'' path
  158
+from any <code>v[i]</code> to any other <code>v[j]</code>:</p>
  159
+<p><code>C^n[i,j] = costs of &quot;shortest&quot; path from v[i] to v[j]</code></p>
  160
+</li>
  161
+<li>
  162
+<p><code>S3 = (Pot(Sigma*), union, concat, {}, {''})</code></p>
  163
+<p><code>M in DFA(Sigma)</code> be a Deterministic Finite Automaton with a set of
  164
+states <code>Q</code>, a subset <code>F</code> of <code>Q</code> of accepting states and a transition
  165
+function <code>delta : Q x Sigma --&gt; Q</code>.</p>
  166
+<p>Define</p>
  167
+<p><code>m(v[i],v[j])  :=</code></p>
  168
+<p><code>    { a in Sigma | delta( q[i] , a ) = q[j] }</code></p>
  169
+<p>and</p>
  170
+<p><code>C^0[i,j] := m(v[i],v[j]);</code></p>
  171
+<p><code>if (i = j) then C^0[i,j] := C^0[i,j] union {''}</code></p>
  172
+<p>(<code>{''}</code> is the set containing the empty string, whereas <code>{}</code> is the
  173
+empty set!)</p>
  174
+<p>Then Kleene's algorithm calculates the language accepted by Deterministic
  175
+Finite Automaton M using</p>
  176
+<p><code>C^k[i,j] = C^k-1[i,j] union</code></p>
  177
+<p><code>    C^k-1[i,k] concat ( C^k-1[k,k] )* concat C^k-1[k,j]</code></p>
  178
+<p>and</p>
  179
+<p><code>L(M)  =  UNION_{ q[j] in F }  C^n[1,j]</code></p>
  180
+<p>(state <code>q[1]</code> is assumed to be the ``start'' state)</p>
  181
+<p>finally being the language recognized by Deterministic Finite Automaton M.</p>
  182
+</li>
  183
+</ul>
  184
+<p>Note that instead of using Kleene's algorithm, you can also use the ``*''
  185
+operator on the associated matrix:</p>
  186
+<p>Define  <code>A[i,j]  :=  m(v[i],v[j])</code></p>
  187
+<p><code>  ==&gt;   A*[i,j]  =  c(v[i],v[j])</code></p>
  188
+<p>Proof:</p>
  189
+<p><code>A*  =  SUM_{i=0}^{+infty} A^i</code></p>
  190
+<p>where  <code>A^0  =  E_{n}</code></p>
  191
+<p>(matrix with one's in its main diagonal and zero's elsewhere)</p>
  192
+<p>and  <code>A^(i+1)  =   A . A^i</code></p>
  193
+<p>Induction over k yields:</p>
  194
+<p><code>A^k[i,j]  =  c_{k}(v[i],v[j])</code></p>
  195
+<dl>
  196
+<dt><strong><a name="item_k__3d_0_3a"><code>k = 0:</code></a></strong>
  197
+
  198
+<dd>
  199
+<p><code>c_{0}(v[i],v[j])  =  d_{i,j}</code></p>
  200
+</dd>
  201
+<dd>
  202
+<p>with  <code>d_{i,j}  :=  (i = j) ? 1 : 0</code></p>
  203
+</dd>
  204
+<dd>
  205
+<p>and  <code>A^0  =  E_{n}  =  [d_{i,j}]</code></p>
  206
+</dd>
  207
+</li>
  208
+<dt><strong><a name="item_k"><code>k-1 -&gt; k:</code></a></strong>
  209
+
  210
+<dd>
  211
+<p><code>c_{k}(v[i],v[j])</code></p>
  212
+</dd>
  213
+<dd>
  214
+<p><code>= SUM_{l=1}^{n} m(v[i],v[l]) . c_{k-1}(v[l],v[j])</code></p>
  215
+</dd>
  216
+<dd>
  217
+<p><code>= SUM_{l=1}^{n} ( a[i,l] . a[l,j] )</code></p>
  218
+</dd>
  219
+<dd>
  220
+<p><code>= [a^{k}_{i,j}]  =  A^1 . A^(k-1)  =  A^k</code></p>
  221
+</dd>
  222
+</li>
  223
+</dl>
  224
+<p>qed</p>
  225
+<p>In other words, the complexity of calculating the closure and doing
  226
+matrix multiplications is of the same order <code>O( n^3 )</code> in Semi-Rings!</p>
  227
+<p>
  228
+</p>
  229
+<hr />
  230
+<h1><a name="see_also">SEE ALSO</a></h1>
  231
+<p>Math::MatrixBool(3), Math::MatrixReal(3), DFA::Kleene(3).</p>
  232
+<p>(All contained in the distribution of the ``Set::IntegerFast'' module)</p>
  233
+<p>Dijkstra's algorithm for shortest paths.</p>
  234
+<p>
  235
+</p>
  236
+<hr />
  237
+<h1><a name="author">AUTHOR</a></h1>
  238
+<p>This document is based on lecture notes and has been put into
  239
+POD format by Steffen Beyer &lt;<a href="mailto:sb@engelschall.com">sb@engelschall.com</a>&gt;.</p>
  240
+<p>
  241
+</p>
  242
+<hr />
  243
+<h1><a name="copyright">COPYRIGHT</a></h1>
  244
+<p>Copyright (c) 1997 by Steffen Beyer. All rights reserved.</p>
  245
+
  246
+</body>
  247
+
  248
+</html>
277  Kleene.pod
Source Rendered
... ...
@@ -0,0 +1,277 @@
  1
+
  2
+=head1 NAME
  3
+
  4
+Kleene's Algorithm - the theory behind it
  5
+
  6
+brief introduction
  7
+
  8
+=head1 DESCRIPTION
  9
+
  10
+=head2 B<Semi-Rings>
  11
+
  12
+A Semi-Ring (S, +, ., 0, 1) is characterized by the following properties:
  13
+
  14
+=over 4
  15
+
  16
+=item 1)
  17
+
  18
+a)  C<(S, +, 0) is a Semi-Group with neutral element 0>
  19
+
  20
+b)  C<(S, ., 1) is a Semi-Group with neutral element 1>
  21
+
  22
+c)  C<0 . a = a . 0 = 0  for all a in S>
  23
+
  24
+=item 2)
  25
+
  26
+C<"+"> is commutative and B<idempotent>, i.e., C<a + a = a>
  27
+
  28
+=item 3)
  29
+
  30
+Distributivity holds, i.e.,
  31
+
  32
+a)  C<a . ( b + c ) = a . b + a . c  for all a,b,c in S>
  33
+
  34
+b)  C<( a + b ) . c = a . c + b . c  for all a,b,c in S>
  35
+
  36
+=item 4)
  37
+
  38
+C<SUM_{i=0}^{+infinity} ( a[i] )>
  39
+
  40
+exists, is well-defined and unique
  41
+
  42
+C<for all a[i] in S>
  43
+
  44
+and associativity, commutativity and idempotency hold
  45
+
  46
+=item 5)
  47
+
  48
+Distributivity for infinite series also holds, i.e.,
  49
+
  50
+  ( SUM_{i=0}^{+infty} a[i] ) . ( SUM_{j=0}^{+infty} b[j] )
  51
+  = SUM_{i=0}^{+infty} ( SUM_{j=0}^{+infty} ( a[i] . b[j] ) )
  52
+
  53
+=back
  54
+
  55
+EXAMPLES:
  56
+
  57
+=over 4
  58
+
  59
+=item *
  60
+
  61
+C<S1 = ({0,1}, |, &, 0, 1)>
  62
+
  63
+Boolean Algebra
  64
+
  65
+See also L<Math::MatrixBool(3)>
  66
+
  67
+=item *
  68
+
  69
+C<S2 = (pos. reals with 0 and +infty, min, +, +infty, 0)>
  70
+
  71
+Positive real numbers including zero and plus infinity
  72
+
  73
+See also L<Math::MatrixReal(3)>
  74
+
  75
+=item *
  76
+
  77
+C<S3 = (Pot(Sigma*), union, concat, {}, {''})>
  78
+
  79
+Formal languages over Sigma (= alphabet)
  80
+
  81
+See also L<DFA::Kleene(3)>
  82
+
  83
+=back
  84
+
  85
+=head2 B<Operator '*'>
  86
+
  87
+(reflexive and transitive closure)
  88
+
  89
+Define an operator called "*" as follows:
  90
+
  91
+    a in S   ==>   a*  :=  SUM_{i=0}^{+infty} a^i
  92
+
  93
+where
  94
+
  95
+    a^0  =  1,   a^(i+1)  =  a . a^i
  96
+
  97
+Then, also
  98
+
  99
+    a*  =  1 + a . a*,   0*  =  1*  =  1
  100
+
  101
+hold.
  102
+
  103
+=head2 B<Kleene's Algorithm>
  104
+
  105
+In its general form, Kleene's algorithm goes as follows:
  106
+
  107
+    for i := 1 to n do
  108
+        for j := 1 to n do
  109
+        begin
  110
+            C^0[i,j] := m(v[i],v[j]);
  111
+            if (i = j) then C^0[i,j] := C^0[i,j] + 1
  112
+        end
  113
+    for k := 1 to n do
  114
+        for i := 1 to n do
  115
+            for j := 1 to n do
  116
+                C^k[i,j] := C^k-1[i,j] + 
  117
+                            C^k-1[i,k] . ( C^k-1[k,k] )* . C^k-1[k,j]
  118
+    for i := 1 to n do
  119
+        for j := 1 to n do
  120
+            c(v[i],v[j]) := C^n[i,j]
  121
+
  122
+=head2 B<Kleene's Algorithm and Semi-Rings>
  123
+
  124
+Kleene's algorithm can be applied to any Semi-Ring having the properties
  125
+listed previously (above). (!)
  126
+
  127
+EXAMPLES:
  128
+
  129
+=over 4
  130
+
  131
+=item *
  132
+
  133
+C<S1 = ({0,1}, |, &, 0, 1)>
  134
+
  135
+C<G(V,E)> be a graph with set of vortices V and set of edges E:
  136
+
  137
+C<m(v[i],v[j])  :=  ( (v[i],v[j]) in E ) ? 1 : 0>
  138
+
  139
+Kleene's algorithm then calculates
  140
+
  141
+C<c^{n}_{i,j} = ( path from v[i] to v[j] exists ) ? 1 : 0>
  142
+
  143
+using
  144
+
  145
+C<C^k[i,j]  =  C^k-1[i,j]  |  C^k-1[i,k]  &  C^k-1[k,j]>
  146
+
  147
+(remember C< 0*  =  1*  =  1 >)
  148
+
  149
+=item *
  150
+
  151
+C<S2 = (pos. reals with 0 and +infty, min, +, +infty, 0)>
  152
+
  153
+C<G(V,E)> be a graph with set of vortices V and set of edges E, with
  154
+costs C<m(v[i],v[j])> associated with each edge C<(v[i],v[j])> in E:
  155
+
  156
+C<m(v[i],v[j])  :=  costs of (v[i],v[j])>
  157
+
  158
+C<for all (v[i],v[j]) in E>
  159
+
  160
+Set C<m(v[i],v[j]) := +infinity> if an edge (v[i],v[j]) is not in E.
  161
+
  162
+C<  ==E<gt>  a* = 0  for all a in S2>
  163
+
  164
+C<  ==E<gt>  C^k[i,j]  =  min( C^k-1[i,j] ,>
  165
+
  166
+C<           C^k-1[i,k]  +  C^k-1[k,j] )>
  167
+
  168
+Kleene's algorithm then calculates the costs of the "shortest" path
  169
+from any C<v[i]> to any other C<v[j]>:
  170
+
  171
+C<C^n[i,j] = costs of "shortest" path from v[i] to v[j]>
  172
+
  173
+=item *
  174
+
  175
+C<S3 = (Pot(Sigma*), union, concat, {}, {''})>
  176
+
  177
+C<M in DFA(Sigma)> be a Deterministic Finite Automaton with a set of
  178
+states C<Q>, a subset C<F> of C<Q> of accepting states and a transition
  179
+function C<delta : Q x Sigma --E<gt> Q>.
  180
+
  181
+Define
  182
+
  183
+C<m(v[i],v[j])  :=>
  184
+
  185
+C<    { a in Sigma | delta( q[i] , a ) = q[j] }>
  186
+
  187
+and
  188
+
  189
+C<C^0[i,j] := m(v[i],v[j]);>
  190
+
  191
+C<if (i = j) then C^0[i,j] := C^0[i,j] union {''}>
  192
+
  193
+(C<{''}> is the set containing the empty string, whereas C<{}> is the
  194
+empty set!)
  195
+
  196
+Then Kleene's algorithm calculates the language accepted by Deterministic
  197
+Finite Automaton M using
  198
+
  199
+C<C^k[i,j] = C^k-1[i,j] union>
  200
+
  201
+C<    C^k-1[i,k] concat ( C^k-1[k,k] )* concat C^k-1[k,j]>
  202
+
  203
+and
  204
+
  205
+C<L(M)  =  UNION_{ q[j] in F }  C^n[1,j]>
  206
+
  207
+(state C<q[1]> is assumed to be the "start" state)
  208
+
  209
+finally being the language recognized by Deterministic Finite Automaton M.
  210
+
  211
+=back
  212
+
  213
+Note that instead of using Kleene's algorithm, you can also use the "*"
  214
+operator on the associated matrix:
  215
+
  216
+Define  C<A[i,j]  :=  m(v[i],v[j])>
  217
+
  218
+C<  ==E<gt>   A*[i,j]  =  c(v[i],v[j])>
  219
+
  220
+Proof:
  221
+
  222
+C<A*  =  SUM_{i=0}^{+infty} A^i>
  223
+
  224
+where  C<A^0  =  E_{n}>
  225
+
  226
+(matrix with one's in its main diagonal and zero's elsewhere)
  227
+
  228
+and  C<A^(i+1)  =   A . A^i>
  229
+
  230
+Induction over k yields:
  231
+
  232
+C<A^k[i,j]  =  c_{k}(v[i],v[j])>
  233
+
  234
+=over 10
  235
+
  236
+=item C<k = 0:>
  237
+
  238
+C<c_{0}(v[i],v[j])  =  d_{i,j}>
  239
+
  240
+with  C<d_{i,j}  :=  (i = j) ? 1 : 0>
  241
+
  242
+and  C<A^0  =  E_{n}  =  [d_{i,j}]>
  243
+
  244
+=item C<k-1 -E<gt> k:>
  245
+
  246
+C<c_{k}(v[i],v[j])>
  247
+
  248
+C<= SUM_{l=1}^{n} m(v[i],v[l]) . c_{k-1}(v[l],v[j])>
  249
+
  250
+C<= SUM_{l=1}^{n} ( a[i,l] . a[l,j] )>
  251
+
  252
+C<= [a^{k}_{i,j}]  =  A^1 . A^(k-1)  =  A^k>
  253
+
  254
+=back
  255
+
  256
+qed
  257
+
  258
+In other words, the complexity of calculating the closure and doing
  259
+matrix multiplications is of the same order C<S<O( n^3 )>> in Semi-Rings!
  260
+
  261
+=head1 SEE ALSO
  262
+
  263
+Math::MatrixBool(3), Math::MatrixReal(3), DFA::Kleene(3).
  264
+
  265
+(All contained in the distribution of the "Set::IntegerFast" module)
  266
+
  267
+Dijkstra's algorithm for shortest paths.
  268
+
  269
+=head1 AUTHOR
  270
+
  271
+This document is based on lecture notes and has been put into
  272
+POD format by Steffen Beyer <sb@engelschall.com>.
  273
+
  274
+=head1 COPYRIGHT
  275
+
  276
+Copyright (c) 1997 by Steffen Beyer. All rights reserved.
  277
+
54  MANIFEST
... ...
@@ -0,0 +1,54 @@
  1
+CHANGES
  2
+CREDITS
  3
+GOALS
  4
+Kleene.pod
  5
+MANIFEST
  6
+Makefile.PL
  7
+MatrixReal.pm
  8
+README
  9
+TODO
  10
+funcs.pl
  11
+t/adjoint.t
  12
+t/arith.t
  13
+t/assign
  14
+t/basic.t
  15
+t/bench
  16
+t/bench_eigen.t
  17
+t/bench_eigen2.t
  18
+t/binary.t
  19
+t/bool.t
  20
+t/cofactor.t
  21
+t/condition.t
  22
+t/det.t
  23
+t/diag.t
  24
+t/div.t
  25
+t/each.t
  26
+t/echelon
  27
+t/eigen_3x3.t
  28
+t/eigen_7x7.t
  29
+t/eigen_NxN.t
  30
+t/exponent.t
  31
+t/ext1.t
  32
+t/funcs.pl
  33
+t/gramian.t
  34
+t/inverse.t
  35
+t/is_LR.t
  36
+t/isrowcol.t
  37
+t/latex.t
  38
+t/matlab.t
  39
+t/minor.t
  40
+t/norm.t
  41
+t/orthogonal.t
  42
+t/periodic.t
  43
+t/product.t
  44
+t/quadratic.t
  45
+t/rank.t
  46
+t/scinotation.t
  47
+t/spectral.t
  48
+t/swap.t
  49
+t/symmetric.t
  50
+t/trace.t
  51
+t/transpose.t
  52
+t/triang.t
  53
+t/vecnorm.t
  54
+t/yacas.t
809  Makefile
... ...
@@ -0,0 +1,809 @@
  1
+# This Makefile is for the Math::MatrixReal extension to perl.
  2
+#
  3
+# It was generated automatically by MakeMaker version
  4
+# 6.30 (Revision: Revision: 4535 ) from the contents of
  5
+# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
  6
+#
  7
+#       ANY CHANGES MADE HERE WILL BE LOST!
  8
+#
  9
+#   MakeMaker ARGV: ()
  10
+#
  11
+#   MakeMaker Parameters:
  12
+
  13
+#     ABSTRACT => q[Manipulate Matrices of Real Numbers]
  14
+#     AUTHOR => q[Jonathan Leto <jonathan@leto.net>]
  15
+#     DEFINE => q[]
  16
+#     DISTNAME => q[Math-MatrixReal]
  17
+#     INC => q[]
  18
+#     LIBS => [q[]]
  19
+#     NAME => q[Math::MatrixReal]
  20
+#     VERSION_FROM => q[MatrixReal.pm]
  21
+#     dist => { COMPRESS=>q[gzip -9], SUFFIX=>q[gz] }
  22
+
  23
+# --- MakeMaker post_initialize section:
  24
+
  25
+
  26
+# --- MakeMaker const_config section:
  27
+
  28
+# These definitions are from config.sh (via /usr/local/lib/perl5/5.8.8/mach/Config.pm)
  29
+
  30
+# They may have been overridden via Makefile.PL or on the command line
  31
+AR = ar
  32
+CC = cc
  33
+CCCDLFLAGS = -DPIC -fPIC
  34
+CCDLFLAGS =   -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE
  35
+DLEXT = so
  36
+DLSRC = dl_dlopen.xs
  37
+LD = cc
  38
+LDDLFLAGS = -shared  -L/usr/local/lib
  39
+LDFLAGS =  -Wl,-E -L/usr/local/lib
  40
+LIBC = 
  41
+LIB_EXT = .a
  42
+OBJ_EXT = .o
  43
+OSNAME = freebsd
  44
+OSVERS = 6.2-release
  45
+RANLIB = :
  46
+SITELIBEXP = /usr/local/lib/perl5/site_perl/5.8.8
  47
+SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.8.8/mach
  48
+SO = so
  49
+EXE_EXT = 
  50
+FULL_AR = /usr/bin/ar
  51
+VENDORARCHEXP = 
  52
+VENDORLIBEXP = 
  53
+
  54
+
  55
+# --- MakeMaker constants section:
  56
+AR_STATIC_ARGS = cr
  57
+DIRFILESEP = /
  58
+DFSEP = $(DIRFILESEP)
  59
+NAME = Math::MatrixReal
  60
+NAME_SYM = Math_MatrixReal
  61
+VERSION = 2.02
  62
+VERSION_MACRO = VERSION
  63
+VERSION_SYM = 2_02
  64
+DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
  65
+XS_VERSION = 2.02
  66
+XS_VERSION_MACRO = XS_VERSION
  67
+XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
  68
+INST_ARCHLIB = blib/arch
  69
+INST_SCRIPT = blib/script
  70
+INST_BIN = blib/bin
  71
+INST_LIB = blib/lib
  72
+INST_MAN1DIR = blib/man1
  73
+INST_MAN3DIR = blib/man3
  74
+MAN1EXT = 1
  75
+MAN3EXT = 3
  76
+INSTALLDIRS = site
  77
+DESTDIR = 
  78
+PREFIX = /usr/local
  79
+PERLPREFIX = /usr/local
  80
+SITEPREFIX = /usr/local
  81
+VENDORPREFIX = 
  82
+INSTALLPRIVLIB = /usr/local/lib/perl5/5.8.8
  83
+DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
  84
+INSTALLSITELIB = /usr/local/lib/perl5/site_perl/5.8.8
  85
+DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
  86
+INSTALLVENDORLIB = 
  87
+DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
  88
+INSTALLARCHLIB = /usr/local/lib/perl5/5.8.8/mach
  89
+DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
  90
+INSTALLSITEARCH = /usr/local/lib/perl5/site_perl/5.8.8/mach
  91
+DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
  92
+INSTALLVENDORARCH = 
  93
+DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
  94
+INSTALLBIN = /usr/local/bin
  95
+DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
  96
+INSTALLSITEBIN = /usr/local/bin
  97
+DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
  98
+INSTALLVENDORBIN = 
  99
+DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
  100
+INSTALLSCRIPT = /usr/local/bin
  101
+DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
  102
+INSTALLMAN1DIR = /usr/local/man/man1
  103
+DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
  104
+INSTALLSITEMAN1DIR = /usr/local/man/man1
  105
+DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
  106
+INSTALLVENDORMAN1DIR = 
  107
+DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
  108
+INSTALLMAN3DIR = /usr/local/lib/perl5/5.8.8/perl/man/man3
  109
+DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
  110
+INSTALLSITEMAN3DIR = /usr/local/lib/perl5/5.8.8/man/man3
  111
+DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
  112
+INSTALLVENDORMAN3DIR = 
  113
+DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
  114
+PERL_LIB = /usr/local/lib/perl5/5.8.8
  115
+PERL_ARCHLIB = /usr/local/lib/perl5/5.8.8/mach
  116
+LIBPERL_A = libperl.a
  117
+FIRST_MAKEFILE = Makefile
  118
+MAKEFILE_OLD = Makefile.old
  119
+MAKE_APERL_FILE = Makefile.aperl
  120
+PERLMAINCC = $(CC)
  121
+PERL_INC = /usr/local/lib/perl5/5.8.8/mach/CORE
  122
+PERL = /usr/bin/perl
  123
+FULLPERL = /usr/bin/perl
  124
+ABSPERL = $(PERL)
  125
+PERLRUN = $(PERL)
  126
+FULLPERLRUN = $(FULLPERL)
  127
+ABSPERLRUN = $(ABSPERL)
  128
+PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
  129
+FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
  130
+ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
  131
+PERL_CORE = 0
  132
+PERM_RW = 644
  133
+PERM_RWX = 755
  134
+
  135
+MAKEMAKER   = /usr/local/lib/perl5/5.8.8/ExtUtils/MakeMaker.pm
  136
+MM_VERSION  = 6.30
  137
+MM_REVISION = Revision: 4535 
  138
+
  139
+# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
  140
+# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
  141
+# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
  142
+# DLBASE  = Basename part of dynamic library. May be just equal BASEEXT.
  143
+FULLEXT = Math/MatrixReal
  144
+BASEEXT = MatrixReal
  145
+PARENT_NAME = Math
  146
+DLBASE = $(BASEEXT)
  147
+VERSION_FROM = MatrixReal.pm
  148
+INC = 
  149
+DEFINE = 
  150
+OBJECT = 
  151
+LDFROM = $(OBJECT)
  152
+LINKTYPE = dynamic
  153
+BOOTDEP = 
  154
+
  155
+# Handy lists of source code files:
  156
+XS_FILES = 
  157
+C_FILES  = 
  158
+O_FILES  = 
  159
+H_FILES  = 
  160
+MAN1PODS = 
  161
+MAN3PODS = Kleene.pod \
  162
+	MatrixReal.pm
  163
+
  164
+# Where is the Config information that we are using/depend on
  165
+CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
  166
+
  167
+# Where to build things
  168
+INST_LIBDIR      = $(INST_LIB)/Math
  169
+INST_ARCHLIBDIR  = $(INST_ARCHLIB)/Math
  170
+
  171
+INST_AUTODIR     = $(INST_LIB)/auto/$(FULLEXT)
  172
+INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
  173
+
  174
+INST_STATIC      = 
  175
+INST_DYNAMIC     = 
  176
+INST_BOOT        = 
  177
+
  178
+# Extra linker info
  179
+EXPORT_LIST        = 
  180
+PERL_ARCHIVE       = 
  181
+PERL_ARCHIVE_AFTER = 
  182
+
  183
+
  184
+TO_INST_PM = Kleene.pod \
  185
+	MatrixReal.pm \
  186
+	funcs.pl
  187
+
  188
+PM_TO_BLIB = Kleene.pod \
  189
+	$(INST_LIB)/Math/Kleene.pod \
  190
+	MatrixReal.pm \
  191
+	$(INST_LIB)/Math/MatrixReal.pm \
  192
+	funcs.pl \
  193
+	$(INST_LIB)/Math/funcs.pl
  194
+
  195
+
  196
+# --- MakeMaker platform_constants section:
  197
+MM_Unix_VERSION = 1.50
  198
+PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
  199
+
  200
+
  201
+# --- MakeMaker tool_autosplit section:
  202
+# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
  203
+AUTOSPLITFILE = $(ABSPERLRUN)  -e 'use AutoSplit;  autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)'
  204
+
  205
+
  206
+
  207
+# --- MakeMaker tool_xsubpp section:
  208
+
  209
+
  210
+# --- MakeMaker tools_other section:
  211
+SHELL = /bin/sh
  212
+CHMOD = chmod
  213
+CP = cp
  214
+MV = mv
  215
+NOOP = $(SHELL) -c true
  216
+NOECHO = @
  217
+RM_F = rm -f
  218
+RM_RF = rm -rf
  219
+TEST_F = test -f
  220
+TOUCH = touch
  221
+UMASK_NULL = umask 0
  222
+DEV_NULL = > /dev/null 2>&1
  223
+MKPATH = $(ABSPERLRUN) "-MExtUtils::Command" -e mkpath
  224
+EQUALIZE_TIMESTAMP = $(ABSPERLRUN) "-MExtUtils::Command" -e eqtime
  225
+ECHO = echo
  226
+ECHO_N = echo -n
  227
+UNINST = 0
  228
+VERBINST = 0
  229
+MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install({@ARGV}, '\''$(VERBINST)'\'', 0, '\''$(UNINST)'\'');'
  230
+DOC_INSTALL = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e perllocal_install
  231
+UNINSTALL = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e uninstall
  232
+WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist
  233
+MACROSTART = 
  234
+MACROEND = 
  235
+USEMAKEFILE = -f
  236
+FIXIN = $(PERLRUN) "-MExtUtils::MY" -e "MY->fixin(shift)"
  237
+
  238
+
  239
+# --- MakeMaker makemakerdflt section:
  240
+makemakerdflt: all
  241
+	$(NOECHO) $(NOOP)
  242
+
  243
+
  244
+# --- MakeMaker dist section:
  245
+TAR = tar
  246
+TARFLAGS = cvf
  247
+ZIP = zip
  248
+ZIPFLAGS = -r
  249
+COMPRESS = gzip -9
  250
+SUFFIX = gz
  251
+SHAR = shar
  252
+PREOP = $(NOECHO) $(NOOP)
  253
+POSTOP = $(NOECHO) $(NOOP)
  254
+TO_UNIX = $(NOECHO) $(NOOP)
  255
+CI = ci -u
  256
+RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
  257
+DIST_CP = best
  258
+DIST_DEFAULT = tardist
  259
+DISTNAME = Math-MatrixReal
  260
+DISTVNAME = Math-MatrixReal-2.02
  261
+
  262
+
  263
+# --- MakeMaker macro section:
  264
+
  265
+
  266
+# --- MakeMaker depend section:
  267
+
  268
+
  269
+# --- MakeMaker cflags section:
  270
+
  271
+
  272
+# --- MakeMaker const_loadlibs section:
  273
+
  274
+
  275
+# --- MakeMaker const_cccmd section:
  276
+
  277
+
  278
+# --- MakeMaker post_constants section:
  279
+
  280
+
  281
+# --- MakeMaker pasthru section:
  282
+
  283
+PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
  284
+	LINKTYPE="$(LINKTYPE)"\
  285
+	PREFIX="$(PREFIX)"\
  286
+	PASTHRU_DEFINE="$(PASTHRU_DEFINE)"\
  287
+	PASTHRU_INC="$(PASTHRU_INC)"
  288
+
  289
+
  290
+# --- MakeMaker special_targets section:
  291
+.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
  292
+
  293
+.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
  294
+
  295
+
  296
+
  297
+# --- MakeMaker c_o section:
  298
+
  299
+
  300
+# --- MakeMaker xs_c section:
  301
+
  302
+
  303
+# --- MakeMaker xs_o section:
  304
+
  305
+
  306
+# --- MakeMaker top_targets section:
  307
+all :: pure_all manifypods
  308
+	$(NOECHO) $(NOOP)
  309
+
  310
+
  311
+pure_all :: config pm_to_blib subdirs linkext
  312
+	$(NOECHO) $(NOOP)
  313
+
  314
+subdirs :: $(MYEXTLIB)
  315
+	$(NOECHO) $(NOOP)
  316
+
  317
+config :: $(FIRST_MAKEFILE) blibdirs
  318
+	$(NOECHO) $(NOOP)
  319
+
  320
+help :
  321
+	perldoc ExtUtils::MakeMaker
  322
+
  323
+
  324
+# --- MakeMaker blibdirs section:
  325
+blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
  326
+	$(NOECHO) $(NOOP)
  327
+
  328
+# Backwards compat with 6.18 through 6.25
  329
+blibdirs.ts : blibdirs
  330
+	$(NOECHO) $(NOOP)
  331
+
  332
+$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
  333
+	$(NOECHO) $(MKPATH) $(INST_LIBDIR)
  334
+	$(NOECHO) $(CHMOD) 755 $(INST_LIBDIR)
  335
+	$(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
  336
+
  337
+$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
  338
+	$(NOECHO) $(MKPATH) $(INST_ARCHLIB)
  339
+	$(NOECHO) $(CHMOD) 755 $(INST_ARCHLIB)
  340
+	$(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
  341
+
  342
+$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
  343
+	$(NOECHO) $(MKPATH) $(INST_AUTODIR)
  344
+	$(NOECHO) $(CHMOD) 755 $(INST_AUTODIR)
  345
+	$(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
  346
+
  347
+$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
  348
+	$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
  349
+	$(NOECHO) $(CHMOD) 755 $(INST_ARCHAUTODIR)
  350
+	$(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
  351
+
  352
+$(INST_BIN)$(DFSEP).exists :: Makefile.PL
  353
+	$(NOECHO) $(MKPATH) $(INST_BIN)
  354
+	$(NOECHO) $(CHMOD) 755 $(INST_BIN)
  355
+	$(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
  356
+
  357
+$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
  358
+	$(NOECHO) $(MKPATH) $(INST_SCRIPT)
  359
+	$(NOECHO) $(CHMOD) 755 $(INST_SCRIPT)
  360
+	$(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
  361
+
  362
+$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
  363
+	$(NOECHO) $(MKPATH) $(INST_MAN1DIR)
  364
+	$(NOECHO) $(CHMOD) 755 $(INST_MAN1DIR)
  365
+	$(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
  366
+
  367
+$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
  368
+	$(NOECHO) $(MKPATH) $(INST_MAN3DIR)
  369
+	$(NOECHO) $(CHMOD) 755 $(INST_MAN3DIR)
  370
+	$(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
  371
+
  372
+
  373
+
  374
+# --- MakeMaker linkext section:
  375
+
  376
+linkext :: $(LINKTYPE)
  377
+	$(NOECHO) $(NOOP)
  378
+
  379
+
  380
+# --- MakeMaker dlsyms section:
  381
+
  382
+
  383
+# --- MakeMaker dynamic section:
  384
+
  385
+dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
  386
+	$(NOECHO) $(NOOP)
  387
+
  388
+
  389
+# --- MakeMaker dynamic_bs section:
  390
+
  391
+BOOTSTRAP =
  392
+
  393
+
  394
+# --- MakeMaker dynamic_lib section:
  395
+
  396
+
  397
+# --- MakeMaker static section:
  398
+
  399
+## $(INST_PM) has been moved to the all: target.
  400
+## It remains here for awhile to allow for old usage: "make static"
  401
+static :: $(FIRST_MAKEFILE) $(INST_STATIC)
  402
+	$(NOECHO) $(NOOP)
  403
+
  404
+
  405
+# --- MakeMaker static_lib section:
  406
+
  407
+
  408
+# --- MakeMaker manifypods section:
  409
+
  410
+POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
  411
+POD2MAN = $(POD2MAN_EXE)
  412
+
  413
+
  414
+manifypods : pure_all  \
  415
+	Kleene.pod \
  416
+	MatrixReal.pm \
  417
+	Kleene.pod \
  418
+	MatrixReal.pm
  419
+	$(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \
  420
+	  Kleene.pod $(INST_MAN3DIR)/Math::Kleene.$(MAN3EXT) \
  421
+	  MatrixReal.pm $(INST_MAN3DIR)/Math::MatrixReal.$(MAN3EXT) 
  422
+
  423
+
  424
+
  425
+
  426
+# --- MakeMaker processPL section:
  427
+
  428
+
  429
+# --- MakeMaker installbin section:
  430
+
  431
+
  432
+# --- MakeMaker subdirs section:
  433
+
  434
+# none
  435
+
  436
+# --- MakeMaker clean_subdirs section:
  437
+clean_subdirs :
  438
+	$(NOECHO) $(NOOP)
  439
+
  440
+
  441
+# --- MakeMaker clean section: