algebra 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +53 -0
  3. data/.travis.yml +7 -0
  4. data/CODE_OF_CONDUCT.md +49 -0
  5. data/Gemfile +7 -0
  6. data/Gemfile.lock +28 -0
  7. data/LICENSE.txt +21 -0
  8. data/README-ja.txt +60 -0
  9. data/README.md +61 -0
  10. data/Rakefile +43 -0
  11. data/algebra.gemspec +33 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/doc-ja/README-ja.html +69 -0
  15. data/doc-ja/README-ja.rd +60 -0
  16. data/doc-ja/README.html +0 -0
  17. data/doc-ja/README.rd +0 -0
  18. data/doc-ja/algebra-ja.html +66 -0
  19. data/doc-ja/algebra-ja.rd +60 -0
  20. data/doc-ja/algebraic-equation-ja.html +36 -0
  21. data/doc-ja/algebraic-equation-ja.rd +26 -0
  22. data/doc-ja/algebraic-extension-field-ja.html +122 -0
  23. data/doc-ja/algebraic-extension-field-ja.rd +118 -0
  24. data/doc-ja/algebraic-parser-ja.html +87 -0
  25. data/doc-ja/algebraic-parser-ja.rd +95 -0
  26. data/doc-ja/changes.html +161 -0
  27. data/doc-ja/changes.rd +119 -0
  28. data/doc-ja/elementary-divisor-ja.html +56 -0
  29. data/doc-ja/elementary-divisor-ja.rd +45 -0
  30. data/doc-ja/euclidian-ring-ja.html +78 -0
  31. data/doc-ja/euclidian-ring-ja.rd +69 -0
  32. data/doc-ja/finite-group-ja.html +285 -0
  33. data/doc-ja/finite-group-ja.rd +276 -0
  34. data/doc-ja/finite-map-ja.html +224 -0
  35. data/doc-ja/finite-map-ja.rd +227 -0
  36. data/doc-ja/finite-set-ja.html +393 -0
  37. data/doc-ja/finite-set-ja.rd +408 -0
  38. data/doc-ja/index-ja.html +113 -0
  39. data/doc-ja/index-ja.rd +112 -0
  40. data/doc-ja/jordan-form-ja.html +106 -0
  41. data/doc-ja/jordan-form-ja.rd +99 -0
  42. data/doc-ja/localized-ring-ja.html +121 -0
  43. data/doc-ja/localized-ring-ja.rd +131 -0
  44. data/doc-ja/m-polynomial-ja.html +542 -0
  45. data/doc-ja/m-polynomial-ja.rd +596 -0
  46. data/doc-ja/matrix-algebra-ja.html +686 -0
  47. data/doc-ja/matrix-algebra-ja.rd +727 -0
  48. data/doc-ja/matrix-algebra-triplet-ja.html +124 -0
  49. data/doc-ja/matrix-algebra-triplet-ja.rd +129 -0
  50. data/doc-ja/permutation-group-ja.html +159 -0
  51. data/doc-ja/permutation-group-ja.rd +151 -0
  52. data/doc-ja/polynomial-converter-ja.html +64 -0
  53. data/doc-ja/polynomial-converter-ja.rd +54 -0
  54. data/doc-ja/polynomial-ja.html +446 -0
  55. data/doc-ja/polynomial-ja.rd +473 -0
  56. data/doc-ja/residue-class-ring-ja.html +112 -0
  57. data/doc-ja/residue-class-ring-ja.rd +113 -0
  58. data/doc-ja/sample-algebraic-equation01.rb.v.rd +11 -0
  59. data/doc-ja/sample-algebraic-equation02.rb.v.rd +11 -0
  60. data/doc-ja/sample-algebraic-root01.rb.v.rd +20 -0
  61. data/doc-ja/sample-algebraicfield01.rb.v.rd +26 -0
  62. data/doc-ja/sample-algebraicfield02.rb.v.rd +15 -0
  63. data/doc-ja/sample-cayleyhamilton01.rb.v.rd +14 -0
  64. data/doc-ja/sample-diagonalization01.rb.v.rd +48 -0
  65. data/doc-ja/sample-divmod01.rb.v.rd +17 -0
  66. data/doc-ja/sample-elementary-divisor01.rb.v.rd +48 -0
  67. data/doc-ja/sample-factorize01.rb.v.rd +11 -0
  68. data/doc-ja/sample-factorize02.rb.v.rd +13 -0
  69. data/doc-ja/sample-factorize03.rb.v.rd +14 -0
  70. data/doc-ja/sample-factorize04.rb.v.rd +14 -0
  71. data/doc-ja/sample-factorize05.rb.v.rd +53 -0
  72. data/doc-ja/sample-galois-group01.rb.v.rd +27 -0
  73. data/doc-ja/sample-gaussian-elimination01.rb.v.rd +19 -0
  74. data/doc-ja/sample-geometry01.rb.v.rd +33 -0
  75. data/doc-ja/sample-geometry02.rb.v.rd +34 -0
  76. data/doc-ja/sample-geometry03.rb.v.rd +45 -0
  77. data/doc-ja/sample-geometry04.rb.v.rd +33 -0
  78. data/doc-ja/sample-geometry07.rb.v.rd +62 -0
  79. data/doc-ja/sample-groebner01.rb.v.rd +13 -0
  80. data/doc-ja/sample-groebner02.rb.v.rd +18 -0
  81. data/doc-ja/sample-groebner03.rb.v.rd +19 -0
  82. data/doc-ja/sample-group01.rb.v.rd +21 -0
  83. data/doc-ja/sample-jordan-form01.rb.v.rd +56 -0
  84. data/doc-ja/sample-jordanform01.rb.v.rd +55 -0
  85. data/doc-ja/sample-lagrange-multiplier01.rb.v.rd +35 -0
  86. data/doc-ja/sample-m-factorize01.rb.v.rd +15 -0
  87. data/doc-ja/sample-m-factorize02.rb.v.rd +12 -0
  88. data/doc-ja/sample-m-polynomial01.rb.v.rd +10 -0
  89. data/doc-ja/sample-map01.rb.v.rd +9 -0
  90. data/doc-ja/sample-polynomial01.rb.v.rd +9 -0
  91. data/doc-ja/sample-polynomial02.rb.v.rd +11 -0
  92. data/doc-ja/sample-primefield01.rb.v.rd +13 -0
  93. data/doc-ja/sample-quotientfield01.rb.v.rd +11 -0
  94. data/doc-ja/sample-quotientfield02.rb.v.rd +18 -0
  95. data/doc-ja/sample-quotientfield03.rb.v.rd +16 -0
  96. data/doc-ja/sample-quotientfield04.rb.v.rd +16 -0
  97. data/doc-ja/sample-set01.rb.v.rd +18 -0
  98. data/doc-ja/sample-splitting-field01.rb.v.rd +19 -0
  99. data/doc-ja/samples-ja.html +885 -0
  100. data/doc-ja/samples-ja.rd +221 -0
  101. data/doc-ja/style.css +85 -0
  102. data/doc-ja/todo.html +20 -0
  103. data/doc-ja/todo.rd +9 -0
  104. data/lib/algebra.rb +36 -0
  105. data/lib/algebra/algebraic-equation.rb +56 -0
  106. data/lib/algebra/algebraic-extension-field.rb +135 -0
  107. data/lib/algebra/algebraic-parser.rb +160 -0
  108. data/lib/algebra/algebraic-system.rb +224 -0
  109. data/lib/algebra/annihilate.rb +52 -0
  110. data/lib/algebra/array-supplement.rb +53 -0
  111. data/lib/algebra/auto-require.rb +84 -0
  112. data/lib/algebra/chinese-rem-th.rb +135 -0
  113. data/lib/algebra/combinatorial.rb +145 -0
  114. data/lib/algebra/elementary-divisor.rb +193 -0
  115. data/lib/algebra/euclidian-ring.rb +161 -0
  116. data/lib/algebra/factors.rb +305 -0
  117. data/lib/algebra/finite-group.rb +374 -0
  118. data/lib/algebra/finite-map.rb +201 -0
  119. data/lib/algebra/finite-set.rb +456 -0
  120. data/lib/algebra/galois-group.rb +129 -0
  121. data/lib/algebra/gaussian-elimination.rb +385 -0
  122. data/lib/algebra/groebner-basis-coeff.rb +228 -0
  123. data/lib/algebra/groebner-basis.rb +197 -0
  124. data/lib/algebra/import-module-single-thread.rb +86 -0
  125. data/lib/algebra/import-module.rb +491 -0
  126. data/lib/algebra/jordan-form.rb +114 -0
  127. data/lib/algebra/linear-algebra.rb +143 -0
  128. data/lib/algebra/localized-ring.rb +294 -0
  129. data/lib/algebra/m-index.rb +282 -0
  130. data/lib/algebra/m-polynomial-factor-int.rb +186 -0
  131. data/lib/algebra/m-polynomial-factor-zp.rb +114 -0
  132. data/lib/algebra/m-polynomial-factor.rb +315 -0
  133. data/lib/algebra/m-polynomial-gcd.rb +40 -0
  134. data/lib/algebra/m-polynomial.rb +875 -0
  135. data/lib/algebra/matrix-algebra-triplet.rb +292 -0
  136. data/lib/algebra/matrix-algebra.rb +929 -0
  137. data/lib/algebra/numeric-supplement.rb +123 -0
  138. data/lib/algebra/permutation-group.rb +257 -0
  139. data/lib/algebra/polynomial-converter.rb +193 -0
  140. data/lib/algebra/polynomial-factor-alg.rb +148 -0
  141. data/lib/algebra/polynomial-factor-int.rb +252 -0
  142. data/lib/algebra/polynomial-factor-zp.rb +165 -0
  143. data/lib/algebra/polynomial-factor.rb +140 -0
  144. data/lib/algebra/polynomial.rb +592 -0
  145. data/lib/algebra/powers.rb +31 -0
  146. data/lib/algebra/prime-gen.rb +32 -0
  147. data/lib/algebra/rational.rb +81 -0
  148. data/lib/algebra/residue-class-ring.rb +219 -0
  149. data/lib/algebra/sets-system.rb +43 -0
  150. data/lib/algebra/splitting-field.rb +103 -0
  151. data/lib/algebra/version.rb +3 -0
  152. data/sample/Makefile +10 -0
  153. data/sample/do-testscripts.rb +100 -0
  154. data/sample/sample-algebraic-equation01.rb +6 -0
  155. data/sample/sample-algebraic-equation02.rb +6 -0
  156. data/sample/sample-algebraic-root01.rb +15 -0
  157. data/sample/sample-algebraicfield01.rb +21 -0
  158. data/sample/sample-algebraicfield02.rb +10 -0
  159. data/sample/sample-cayleyhamilton01.rb +9 -0
  160. data/sample/sample-diagonalization01.rb +43 -0
  161. data/sample/sample-divmod01.rb +12 -0
  162. data/sample/sample-elementary-divisor01.rb +43 -0
  163. data/sample/sample-factorize01.rb +6 -0
  164. data/sample/sample-factorize02.rb +8 -0
  165. data/sample/sample-factorize03.rb +9 -0
  166. data/sample/sample-factorize04.rb +9 -0
  167. data/sample/sample-factorize05.rb +48 -0
  168. data/sample/sample-galois-group01.rb +22 -0
  169. data/sample/sample-gaussian-elimination01.rb +14 -0
  170. data/sample/sample-geometry01.rb +28 -0
  171. data/sample/sample-geometry02.rb +29 -0
  172. data/sample/sample-geometry03.rb +40 -0
  173. data/sample/sample-geometry04.rb +28 -0
  174. data/sample/sample-geometry07.rb +58 -0
  175. data/sample/sample-groebner01.rb +8 -0
  176. data/sample/sample-groebner02.rb +13 -0
  177. data/sample/sample-groebner03.rb +14 -0
  178. data/sample/sample-group01.rb +16 -0
  179. data/sample/sample-jordan-form01.rb +51 -0
  180. data/sample/sample-lagrange-multiplier01.rb +30 -0
  181. data/sample/sample-m-factorize01.rb +10 -0
  182. data/sample/sample-m-factorize02.rb +7 -0
  183. data/sample/sample-m-polynomial01.rb +5 -0
  184. data/sample/sample-map01.rb +4 -0
  185. data/sample/sample-polynomial01.rb +4 -0
  186. data/sample/sample-polynomial02.rb +6 -0
  187. data/sample/sample-primefield01.rb +8 -0
  188. data/sample/sample-quotientfield01.rb +6 -0
  189. data/sample/sample-quotientfield02.rb +13 -0
  190. data/sample/sample-quotientfield03.rb +11 -0
  191. data/sample/sample-quotientfield04.rb +11 -0
  192. data/sample/sample-set01.rb +13 -0
  193. data/sample/sample-splitting-field01.rb +14 -0
  194. data/sample/test-00-cayley-hamilton.rb +76 -0
  195. data/sample/test-00-groebner-basis.rb +274 -0
  196. data/sample/test-00-polynomial-factor-alg.rb +89 -0
  197. data/sample/test-00.list +4 -0
  198. data/sample/time-trial.rb +65 -0
  199. metadata +373 -0
@@ -0,0 +1,124 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml">
6
+ <head>
7
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
8
+ <title>doc-ja/matrix-algebra-triplet-ja.rd</title>
9
+ <link href="style.css" type="text/css" rel="stylesheet" />
10
+ </head>
11
+ <body>
12
+ <p>[<a href="index-ja.html">index-ja</a>]
13
+ <a href="#label-0">Algebra::MatrixAlgebraTriplet</a>
14
+ /
15
+ <a href="#label-32">Algebra::MatrixAlgebraQuint</a></p>
16
+ <h1><a name="label-0" id="label-0">Algebra::MatrixAlgebraTriplet</a></h1><!-- RDLabel: "Algebra::MatrixAlgebraTriplet" -->
17
+ <p><em>(3つ組行列のクラス)</em></p>
18
+ <p>行列と行列に対する左右の基本変形を記録した2つの行列を表すクラス。下位クラス
19
+ に5つ組みクラス <a href="#label-32">Algebra::MatrixAlgebraQuint</a> がある。</p>
20
+ <h2><a name="label-1" id="label-1">ファイル名:</a></h2><!-- RDLabel: "ファイル名:" -->
21
+ <ul>
22
+ <li><var>matrix-algebra-triplet.rb</var></li>
23
+ </ul>
24
+ <h2><a name="label-2" id="label-2">スーパークラス:</a></h2><!-- RDLabel: "スーパークラス:" -->
25
+ <ul>
26
+ <li><var>Object</var></li>
27
+ </ul>
28
+ <h2><a name="label-3" id="label-3">インクルードしているモジュール:</a></h2><!-- RDLabel: "インクルードしているモジュール:" -->
29
+ <ul>
30
+ <li><var>GaussianElimination</var></li>
31
+ <li><var>ElementaryDivisor</var></li>
32
+ </ul>
33
+ <h3><a name="label-4" id="label-4">クラスメソッド:</a></h3><!-- RDLabel: "クラスメソッド:" -->
34
+ <dl>
35
+ <dt><a name="label-5" id="label-5"><code>:new(<var>matrix</var>[, <var>left</var>[, <var>right</var>]])</code></a></dt><!-- RDLabel: ":new" -->
36
+ <dd>
37
+ <var>matrix</var> を本体、<var>left</var>左(行)変形の記録、<var>right</var>
38
+ を右(列)変形の記録とする3つ組みオブジェクトを生成します。</dd>
39
+ </dl>
40
+ <h2><a name="label-6" id="label-6">メソッド:</a></h2><!-- RDLabel: "メソッド:" -->
41
+ <dl>
42
+ <dt><a name="label-7" id="label-7"><code>body</code></a></dt><!-- RDLabel: "body" -->
43
+ <dd>
44
+ 本体を返します。</dd>
45
+ <dt><a name="label-8" id="label-8"><code>left</code></a></dt><!-- RDLabel: "left" -->
46
+ <dd>
47
+ 左(行)変形の記録を返します。</dd>
48
+ <dt><a name="label-9" id="label-9"><code>right</code></a></dt><!-- RDLabel: "right" -->
49
+ <dd>
50
+ 右(列)変形の記録を返します。</dd>
51
+ <dt><a name="label-10" id="label-10"><code>to_a</code></a></dt><!-- RDLabel: "to_a" -->
52
+ <dd>
53
+ <code>[body, left, right]</code> という配列を返します。</dd>
54
+ <dt><a name="label-11" id="label-11"><code>to_ary</code></a></dt><!-- RDLabel: "to_ary" -->
55
+ <dd>
56
+ <a href="#label-10">to_a</a> と同じ。</dd>
57
+ <dt><a name="label-12" id="label-12"><code>dup</code></a></dt><!-- RDLabel: "dup" -->
58
+ <dd>
59
+ 自身の複製を返します。</dd>
60
+ <dt><a name="label-13" id="label-13"><code>transpose</code></a></dt><!-- RDLabel: "transpose" -->
61
+ <dd>
62
+ <p>転置行列を返します。</p>
63
+ <pre>[type.new(body.transpose, right.transpose, left.transpose]</pre>
64
+ <p>と同じです。</p></dd>
65
+ <dt><a name="label-14" id="label-14"><code>replace(<var>other</var>)</code></a></dt><!-- RDLabel: "replace" -->
66
+ <dd>
67
+ 自分を <var>other</var> と置き換えます。</dd>
68
+ <dt><a name="label-15" id="label-15"><code>display</code></a></dt><!-- RDLabel: "display" -->
69
+ <dd>
70
+ 自分を表示します。</dd>
71
+ <dt><a name="label-16" id="label-16"><code>[<var>i</var>, <var>j</var>]</code></a></dt><!-- RDLabel: "[]" -->
72
+ <dd>
73
+ 自分の <code>(i, j)</code> 成分を返します。</dd>
74
+ <dt><a name="label-17" id="label-17"><code>rsize</code></a></dt><!-- RDLabel: "rsize" -->
75
+ <dd>
76
+ 行サイズを返します。</dd>
77
+ <dt><a name="label-18" id="label-18"><code>csize</code></a></dt><!-- RDLabel: "csize" -->
78
+ <dd>
79
+ 列サイズを返します。</dd>
80
+ <dt><a name="label-19" id="label-19"><code>each_i</code></a></dt><!-- RDLabel: "each_i" -->
81
+ <dd>
82
+ すべての行インデックスに対して繰り返すイテレータです。</dd>
83
+ <dt><a name="label-20" id="label-20"><code>each_j</code></a></dt><!-- RDLabel: "each_j" -->
84
+ <dd>
85
+ すべての列インデックスに対して繰り返すイテレータです。</dd>
86
+ <dt><a name="label-21" id="label-21"><code>row!(<var>i</var>)</code></a></dt><!-- RDLabel: "row!" -->
87
+ <dd>
88
+ 本体の <var>i</var> 行目そのものを返します。</dd>
89
+ <dt><a name="label-22" id="label-22"><code>sswap_r!(<var>i</var>, <var>j</var>)</code></a></dt><!-- RDLabel: "sswap_r!" -->
90
+ <dt><a name="label-23" id="label-23"><code>swap_r!(<var>i</var>, <var>j</var>)</code></a></dt><!-- RDLabel: "swap_r!" -->
91
+ <dt><a name="label-24" id="label-24"><code>swap_c!(<var>i</var>, <var>j</var>)</code></a></dt><!-- RDLabel: "swap_c!" -->
92
+ <dt><a name="label-25" id="label-25"><code>multiply_r!(<var>i</var>, <var>c</var>)</code></a></dt><!-- RDLabel: "multiply_r!" -->
93
+ <dt><a name="label-26" id="label-26"><code>multiply_c!(<var>j</var>, <var>c</var>)</code></a></dt><!-- RDLabel: "multiply_c!" -->
94
+ <dt><a name="label-27" id="label-27"><code>divide_r!(<var>i</var>, <var>c</var>)</code></a></dt><!-- RDLabel: "divide_r!" -->
95
+ <dt><a name="label-28" id="label-28"><code>divide_c!(<var>j</var>, <var>c</var>)</code></a></dt><!-- RDLabel: "divide_c!" -->
96
+ <dt><a name="label-29" id="label-29"><code>mix_r!(<var>i</var>, <var>j</var>[, <var>c</var>])</code></a></dt><!-- RDLabel: "mix_r!" -->
97
+ <dt><a name="label-30" id="label-30"><code>mix_c!(<var>i</var>, <var>j</var>[, <var>c</var>])</code></a></dt><!-- RDLabel: "mix_c!" -->
98
+ <dt><a name="label-31" id="label-31"><code>left_eliminate!</code></a></dt><!-- RDLabel: "left_eliminate!" -->
99
+ <dd>
100
+ 以上、<var>Algebra::GauusianElimination</var> の同名メソッドを参照。</dd>
101
+ </dl>
102
+ <h1><a name="label-32" id="label-32">Algebra::MatrixAlgebraQuint</a></h1><!-- RDLabel: "Algebra::MatrixAlgebraQuint" -->
103
+ <p><em>(5つ組行列のクラス)</em></p>
104
+ <p>行列と行列に対する左右の基本変形、それらの逆行列を記録した計5つの
105
+ 行列を表すクラス。上位クラスに3つ組みクラス <a href="#label-0">Algebra::MatrixAlgebraTriplet</a> がある。</p>
106
+ <h2><a name="label-33" id="label-33">スーパークラス:</a></h2><!-- RDLabel: "スーパークラス:" -->
107
+ <ul>
108
+ <li><var>Algebra:MatrixAlgebraTriplet</var></li>
109
+ </ul>
110
+ <h2><a name="label-34" id="label-34">メソッド:</a></h2><!-- RDLabel: "メソッド:" -->
111
+ <dl>
112
+ <dt><a name="label-35" id="label-35"><code>lefti</code></a></dt><!-- RDLabel: "lefti" -->
113
+ <dd>
114
+ <a href="#label-8">left</a> の逆行列を返します。</dd>
115
+ <dt><a name="label-36" id="label-36"><code>righti</code></a></dt><!-- RDLabel: "righti" -->
116
+ <dd>
117
+ <a href="#label-9">right</a> の逆行列を返します。</dd>
118
+ <dt><a name="label-37" id="label-37"><code>to_a</code></a></dt><!-- RDLabel: "to_a" -->
119
+ <dd>
120
+ <code>[body, left, right, lefti, righti]</code> という配列を返します。</dd>
121
+ </dl>
122
+
123
+ </body>
124
+ </html>
@@ -0,0 +1,129 @@
1
+ =begin
2
+ [((<index-ja|URL:index-ja.html>))]
3
+ ((<Algebra::MatrixAlgebraTriplet>))
4
+ /
5
+ ((<Algebra::MatrixAlgebraQuint>))
6
+
7
+
8
+ = Algebra::MatrixAlgebraTriplet
9
+
10
+ ((*(3つ組行列のクラス)*))
11
+
12
+ 行列と行列に対する左右の基本変形を記録した2つの行列を表すクラス。下位クラス
13
+ に5つ組みクラス ((<Algebra::MatrixAlgebraQuint>)) がある。
14
+
15
+ == ファイル名:
16
+ * ((|matrix-algebra-triplet.rb|))
17
+
18
+ == スーパークラス:
19
+
20
+ * ((|Object|))
21
+
22
+ == インクルードしているモジュール:
23
+ * ((|GaussianElimination|))
24
+ * ((|ElementaryDivisor|))
25
+
26
+
27
+ === クラスメソッド:
28
+
29
+ --- :new(matrix[, left[, right]])
30
+ ((|matrix|)) を本体、((|left|))左(行)変形の記録、((|right|))
31
+ を右(列)変形の記録とする3つ組みオブジェクトを生成します。
32
+
33
+ == メソッド:
34
+
35
+ --- body
36
+ 本体を返します。
37
+
38
+ --- left
39
+ 左(行)変形の記録を返します。
40
+
41
+ --- right
42
+ 右(列)変形の記録を返します。
43
+
44
+ --- to_a
45
+ (({[body, left, right]})) という配列を返します。
46
+
47
+ --- to_ary
48
+ ((<to_a>)) と同じ。
49
+
50
+ --- dup
51
+ 自身の複製を返します。
52
+
53
+ --- transpose
54
+ 転置行列を返します。
55
+
56
+ [type.new(body.transpose, right.transpose, left.transpose]
57
+
58
+ と同じです。
59
+
60
+ --- replace(other)
61
+ 自分を ((|other|)) と置き換えます。
62
+
63
+ --- display
64
+ 自分を表示します。
65
+
66
+ --- [](i, j)
67
+ 自分の (({(i, j)})) 成分を返します。
68
+
69
+ --- rsize
70
+ 行サイズを返します。
71
+
72
+ --- csize
73
+ 列サイズを返します。
74
+
75
+ --- each_i
76
+ すべての行インデックスに対して繰り返すイテレータです。
77
+
78
+ --- each_j
79
+ すべての列インデックスに対して繰り返すイテレータです。
80
+
81
+ --- row!(i)
82
+ 本体の ((|i|)) 行目そのものを返します。
83
+
84
+ --- sswap_r!(i, j)
85
+
86
+ --- swap_r!(i, j)
87
+
88
+ --- swap_c!(i, j)
89
+
90
+ --- multiply_r!(i, c)
91
+
92
+ --- multiply_c!(j, c)
93
+
94
+ --- divide_r!(i, c)
95
+
96
+ --- divide_c!(j, c)
97
+
98
+ --- mix_r!(i, j[, c])
99
+
100
+ --- mix_c!(i, j[, c])
101
+
102
+ --- left_eliminate!
103
+ 以上、((|Algebra::GauusianElimination|)) の同名メソッドを参照。
104
+
105
+
106
+ = Algebra::MatrixAlgebraQuint
107
+
108
+ ((*(5つ組行列のクラス)*))
109
+
110
+ 行列と行列に対する左右の基本変形、それらの逆行列を記録した計5つの
111
+ 行列を表すクラス。上位クラスに3つ組みクラス ((<Algebra::MatrixAlgebraTriplet>)) がある。
112
+
113
+ == スーパークラス:
114
+
115
+ * ((|Algebra:MatrixAlgebraTriplet|))
116
+
117
+
118
+ == メソッド:
119
+
120
+ --- lefti
121
+ ((<left>)) の逆行列を返します。
122
+
123
+ --- righti
124
+ ((<right>)) の逆行列を返します。
125
+
126
+ --- to_a
127
+ (({[body, left, right, lefti, righti]})) という配列を返します。
128
+
129
+ =end
@@ -0,0 +1,159 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml">
6
+ <head>
7
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
8
+ <title>doc-ja/permutation-group-ja.rd</title>
9
+ <link href="style.css" type="text/css" rel="stylesheet" />
10
+ </head>
11
+ <body>
12
+ <p>[<a href="index-ja.html">index-ja</a>]
13
+ <a href="#label-0">Algebra::PermutationGroup</a>
14
+ /
15
+ <a href="#label-10">Algebra::Permutation</a></p>
16
+ <h1><a name="label-0" id="label-0">Algebra::PermutationGroup</a></h1><!-- RDLabel: "Algebra::PermutationGroup" -->
17
+ <p>置換群のクラスです。要素として <!-- Reference, RDLabel "Permutation" doesn't exist --><em class="label-not-found">Permutation</em><!-- Reference end --> のインスタンス
18
+ が指定されているとします。</p>
19
+ <h2><a name="label-1" id="label-1">ファイル名:</a></h2><!-- RDLabel: "ファイル名:" -->
20
+ <ul>
21
+ <li><var>permutation-group.rb</var></li>
22
+ </ul>
23
+ <h2><a name="label-2" id="label-2">スーパークラス:</a></h2><!-- RDLabel: "スーパークラス:" -->
24
+ <ul>
25
+ <li><var>Group</var></li>
26
+ </ul>
27
+ <h2><a name="label-3" id="label-3">クラスメソッド:</a></h2><!-- RDLabel: "クラスメソッド:" -->
28
+ <dl>
29
+ <dt><a name="label-4" id="label-4"><code>::new(<var>u</var>, [<var>g0</var>, [<var>g1</var>, ...]])</code></a></dt><!-- RDLabel: "::new" -->
30
+ <dd>
31
+ <var>u</var> を単位元とし、<var>g0</var>, <var>g1</var>, ... で構成される群を
32
+ 返します。</dd>
33
+ <dt><a name="label-5" id="label-5"><code>::unit_group(<var>d</var>)</code></a></dt><!-- RDLabel: "::unit_group" -->
34
+ <dd>
35
+ 次数が <var>d</var> の単位群を返します。</dd>
36
+ <dt><a name="label-6" id="label-6"><code>::unity(<var>n</var>)</code></a></dt><!-- RDLabel: "::unity" -->
37
+ <dd>
38
+ 次数が <var>n</var> の単位元を返します。</dd>
39
+ <dt><a name="label-7" id="label-7"><code>::perm(<var>a</var>)</code></a></dt><!-- RDLabel: "::perm" -->
40
+ <dd>
41
+ 配列 <var>a</var> で表される置換を返します。</dd>
42
+ <dt><a name="label-8" id="label-8"><code>::symmetric(<var>n</var>)</code></a></dt><!-- RDLabel: "::symmetric" -->
43
+ <dd>
44
+ <var>n</var> 次の対称群を返します。</dd>
45
+ <dt><a name="label-9" id="label-9"><code>::alternate(<var>n</var>)</code></a></dt><!-- RDLabel: "::alternate" -->
46
+ <dd>
47
+ <var>n</var> 次の交代群を返します。</dd>
48
+ </dl>
49
+ <h1><a name="label-10" id="label-10">Algebra::Permutation</a></h1><!-- RDLabel: "Algebra::Permutation" -->
50
+ <p>置換を表現するクラスです。</p>
51
+ <h2><a name="label-11" id="label-11">ファイル名:</a></h2><!-- RDLabel: "ファイル名:" -->
52
+ <ul>
53
+ <li><var>permutation-group.rb</var></li>
54
+ </ul>
55
+ <h2><a name="label-12" id="label-12">スーパークラス:</a></h2><!-- RDLabel: "スーパークラス:" -->
56
+ <ul>
57
+ <li><var>Object</var></li>
58
+ </ul>
59
+ <h2><a name="label-13" id="label-13">インクルードしているモジュール:</a></h2><!-- RDLabel: "インクルードしているモジュール:" -->
60
+ <ul>
61
+ <li><var>Enumerable</var></li>
62
+ <li><var>Powers</var></li>
63
+ </ul>
64
+ <h2><a name="label-14" id="label-14">クラスメソッド:</a></h2><!-- RDLabel: "クラスメソッド:" -->
65
+ <dl>
66
+ <dt><a name="label-15" id="label-15"><code>::new(<var>x</var>)</code></a></dt><!-- RDLabel: "::new" -->
67
+ <dd>
68
+ <var>x</var> という配列で表現される置換を生成します。</dd>
69
+ <dt><a name="label-16" id="label-16"><code>::[[<var>n0</var>, [<var>n1</var>, [<var>n2</var>, ..., ]]]]</code></a></dt><!-- RDLabel: "::[]" -->
70
+ <dd>
71
+ <p><code>[n0, n1, n2, ..., ]</code> という置換を生成します。
72
+ 例</p>
73
+ <pre>a = Permutation[1, 2, 0]
74
+ p a**2 #=&gt; [2, 0, 1]
75
+ p a**3 #=&gt; [0, 1, 2]</pre></dd>
76
+ <dt><a name="label-17" id="label-17"><code>::unity(<var>d</var>)</code></a></dt><!-- RDLabel: "::unity" -->
77
+ <dd>
78
+ <var>d</var> 次の単位元を返します。</dd>
79
+ <dt><a name="label-18" id="label-18"><code>::cyclic2perm(<var>c</var>, <var>n</var>)</code></a></dt><!-- RDLabel: "::cyclic2perm" -->
80
+ <dd>
81
+ <p><var>c</var> という巡回置換を表す配列の配列から、<!-- Reference, RDLabel "Permutation" doesn't exist --><em class="label-not-found">Permutation</em><!-- Reference end -->
82
+ オブジェクトを生成します。<var>n</var> は次数です。
83
+ <a href="#label-38">decompose_cyclic</a> の逆です。</p>
84
+ <p>例: </p>
85
+ <pre>Permutation.cyclic2perm([[1,6,5,4], [2,3]], 7) #=&gt; [0, 6, 3, 2, 1, 4, 5]
86
+ Permutation[0, 6, 3, 2, 1, 4, 5].decompose_cyclic #=&gt; [[1,6,5,4], [2,3]]</pre></dd>
87
+ </dl>
88
+ <h2><a name="label-19" id="label-19">メソッド:</a></h2><!-- RDLabel: "メソッド:" -->
89
+ <dl>
90
+ <dt><a name="label-20" id="label-20"><code>unity</code></a></dt><!-- RDLabel: "unity" -->
91
+ <dd>
92
+ 単位元を返します。</dd>
93
+ <dt><a name="label-21" id="label-21"><code>perm</code></a></dt><!-- RDLabel: "perm" -->
94
+ <dd>
95
+ 配列表現を返します。</dd>
96
+ <dt><a name="label-22" id="label-22"><code>degree</code></a></dt><!-- RDLabel: "degree" -->
97
+ <dd>
98
+ 次数を返します。</dd>
99
+ <dt><a name="label-23" id="label-23"><code>size</code></a></dt><!-- RDLabel: "size" -->
100
+ <dd>
101
+ <a href="#label-22">degree</a> のエイリアスです。</dd>
102
+ <dt><a name="label-24" id="label-24"><code>each</code></a></dt><!-- RDLabel: "each" -->
103
+ <dd>
104
+ 置換の各元について繰り返します。</dd>
105
+ <dt><a name="label-25" id="label-25"><code>eql?(<var>other</var>)</code></a></dt><!-- RDLabel: "eql?" -->
106
+ <dd>
107
+ <var>other</var> と等しいとき真を返します。</dd>
108
+ <dt><a name="label-26" id="label-26"><code>==</code></a></dt><!-- RDLabel: "==" -->
109
+ <dd>
110
+ <var>eql?</var> のエイリアスです。</dd>
111
+ <dt><a name="label-27" id="label-27"><code>hash</code></a></dt><!-- RDLabel: "hash" -->
112
+ <dd>
113
+ ハッシュ値を返します。</dd>
114
+ <dt><a name="label-28" id="label-28"><code>[<var>i</var>]</code></a></dt><!-- RDLabel: "[]" -->
115
+ <dd>
116
+ <var>i</var> の置換先を返します。</dd>
117
+ <dt><a name="label-29" id="label-29"><code>call</code></a></dt><!-- RDLabel: "call" -->
118
+ <dd>
119
+ <a href="#label-28">[]</a> のエイリアスです。</dd>
120
+ <dt><a name="label-30" id="label-30"><code>index(<var>i</var>)</code></a></dt><!-- RDLabel: "index" -->
121
+ <dd>
122
+ <var>i</var> の置換元を返します。</dd>
123
+ <dt><a name="label-31" id="label-31"><code>right_act(<var>other</var>)</code></a></dt><!-- RDLabel: "right_act" -->
124
+ <dd>
125
+ <var>other</var> に右からかけます。すなわち
126
+ <code>(g.right_act(h))[x] == h[g[x]]</code> が成立します。</dd>
127
+ <dt><a name="label-32" id="label-32"><code>*</code></a></dt><!-- RDLabel: "*" -->
128
+ <dd>
129
+ <a href="#label-31">right_act</a> のエイリアスです。</dd>
130
+ <dt><a name="label-33" id="label-33"><code>left_act(<var>other</var>)</code></a></dt><!-- RDLabel: "left_act" -->
131
+ <dd>
132
+ <var>other</var> に左からからかけます。すなわち
133
+ <code>(g.left_act(h))[x] == g[h[x]]</code> が成立します。</dd>
134
+ <dt><a name="label-34" id="label-34"><code>inverse</code></a></dt><!-- RDLabel: "inverse" -->
135
+ <dd>
136
+ 逆元を返します。</dd>
137
+ <dt><a name="label-35" id="label-35"><code>inv</code></a></dt><!-- RDLabel: "inv" -->
138
+ <dd>
139
+ <var>inverse</var> のエイリアスです。</dd>
140
+ <dt><a name="label-36" id="label-36"><code>sign</code></a></dt><!-- RDLabel: "sign" -->
141
+ <dd>
142
+ 符号を返します。</dd>
143
+ <dt><a name="label-37" id="label-37"><code>conjugate(<var>g</var>)</code></a></dt><!-- RDLabel: "conjugate" -->
144
+ <dd>
145
+ <var>g</var> による共役 <code>g * self * g.inv</code> を返します。</dd>
146
+ <dt><a name="label-38" id="label-38"><code>decompose_cyclic</code></a></dt><!-- RDLabel: "decompose_cyclic" -->
147
+ <dd>
148
+ 配列による巡回表現の配列を返します。
149
+ <!-- Reference, RDLabel "::cyclic2perm(c, n)" doesn't exist --><em class="label-not-found">::cyclic2perm(c, n)</em><!-- Reference end --> の逆です。</dd>
150
+ <dt><a name="label-39" id="label-39"><code>to_map</code></a></dt><!-- RDLabel: "to_map" -->
151
+ <dd>
152
+ <a href="finite-map-ja.html">Map</a> オブジェクト化します。</dd>
153
+ <dt><a name="label-40" id="label-40"><code>decompose_transposition</code></a></dt><!-- RDLabel: "decompose_transposition" -->
154
+ <dd>
155
+ 互換の配列に分解したものを返します。</dd>
156
+ </dl>
157
+
158
+ </body>
159
+ </html>
@@ -0,0 +1,151 @@
1
+ ########################################################################
2
+ # #
3
+ # lib/permutation-group.rb #
4
+ # #
5
+ ########################################################################
6
+ =begin
7
+ [((<index-ja|URL:index-ja.html>))]
8
+ ((<Algebra::PermutationGroup>))
9
+ /
10
+ ((<Algebra::Permutation>))
11
+
12
+ = Algebra::PermutationGroup
13
+ 置換群のクラスです。要素として ((<Permutation>)) のインスタンス
14
+ が指定されているとします。
15
+
16
+
17
+ == ファイル名:
18
+ * ((|permutation-group.rb|))
19
+
20
+ == スーパークラス:
21
+ * ((|Group|))
22
+
23
+ == クラスメソッド:
24
+
25
+ --- ::new(u, [g0, [g1, ...]])
26
+ ((|u|)) を単位元とし、((|g0|)), ((|g1|)), ... で構成される群を
27
+ 返します。
28
+
29
+ --- ::unit_group(d)
30
+ 次数が ((|d|)) の単位群を返します。
31
+
32
+ --- ::unity(n)
33
+ 次数が ((|n|)) の単位元を返します。
34
+
35
+ --- ::perm(a)
36
+ 配列 ((|a|)) で表される置換を返します。
37
+
38
+ --- ::symmetric(n)
39
+ ((|n|)) 次の対称群を返します。
40
+
41
+ --- ::alternate(n)
42
+ ((|n|)) 次の交代群を返します。
43
+
44
+ = Algebra::Permutation
45
+ 置換を表現するクラスです。
46
+
47
+
48
+ == ファイル名:
49
+ * ((|permutation-group.rb|))
50
+
51
+ == スーパークラス:
52
+ * ((|Object|))
53
+
54
+ == インクルードしているモジュール:
55
+
56
+ * ((|Enumerable|))
57
+ * ((|Powers|))
58
+
59
+ == クラスメソッド:
60
+
61
+ --- ::new(x)
62
+ ((|x|)) という配列で表現される置換を生成します。
63
+
64
+ --- ::[]([n0, [n1, [n2, ..., ]]])
65
+ (({[n0, n1, n2, ..., ]})) という置換を生成します。
66
+
67
+ a = Permutation[1, 2, 0]
68
+ p a**2 #=> [2, 0, 1]
69
+ p a**3 #=> [0, 1, 2]
70
+
71
+ --- ::unity(d)
72
+ ((|d|)) 次の単位元を返します。
73
+
74
+ --- ::cyclic2perm(c, n)
75
+ ((|c|)) という巡回置換を表す配列の配列から、((<Permutation>))
76
+ オブジェクトを生成します。((|n|)) は次数です。
77
+ ((<decompose_cyclic>)) の逆です。
78
+
79
+ 例:
80
+ Permutation.cyclic2perm([[1,6,5,4], [2,3]], 7) #=> [0, 6, 3, 2, 1, 4, 5]
81
+ Permutation[0, 6, 3, 2, 1, 4, 5].decompose_cyclic #=> [[1,6,5,4], [2,3]]
82
+
83
+ == メソッド:
84
+ --- unity
85
+ 単位元を返します。
86
+
87
+ --- perm
88
+ 配列表現を返します。
89
+
90
+ --- degree
91
+ 次数を返します。
92
+
93
+ --- size
94
+ ((<degree>)) のエイリアスです。
95
+
96
+ --- each
97
+ 置換の各元について繰り返します。
98
+
99
+ --- eql?(other)
100
+ ((|other|)) と等しいとき真を返します。
101
+
102
+ --- ==
103
+ ((|eql?|)) のエイリアスです。
104
+
105
+ --- hash
106
+ ハッシュ値を返します。
107
+
108
+ --- [](i)
109
+ ((|i|)) の置換先を返します。
110
+
111
+ --- call
112
+ ((<[]>)) のエイリアスです。
113
+
114
+ --- index(i)
115
+ ((|i|)) の置換元を返します。
116
+
117
+ --- right_act(other)
118
+ ((|other|)) に右からかけます。すなわち
119
+ (({(g.right_act(h))[x] == h[g[x]]})) が成立します。
120
+
121
+ --- *
122
+ ((<right_act>)) のエイリアスです。
123
+
124
+ --- left_act(other)
125
+ ((|other|)) に左からからかけます。すなわち
126
+ (({(g.left_act(h))[x] == g[h[x]]})) が成立します。
127
+
128
+ --- inverse
129
+ 逆元を返します。
130
+
131
+ --- inv
132
+ ((|inverse|)) のエイリアスです。
133
+
134
+ --- sign
135
+ 符号を返します。
136
+
137
+ --- conjugate(g)
138
+ ((|g|)) による共役 (({g * self * g.inv})) を返します。
139
+
140
+ --- decompose_cyclic
141
+ 配列による巡回表現の配列を返します。
142
+ ((<::cyclic2perm(c, n)>)) の逆です。
143
+
144
+ --- to_map
145
+ ((<Map|URL:finite-map-ja.html>)) オブジェクト化します。
146
+
147
+ --- decompose_transposition
148
+ 互換の配列に分解したものを返します。
149
+
150
+ =end
151
+