algebra 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +53 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +28 -0
- data/LICENSE.txt +21 -0
- data/README-ja.txt +60 -0
- data/README.md +61 -0
- data/Rakefile +43 -0
- data/algebra.gemspec +33 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc-ja/README-ja.html +69 -0
- data/doc-ja/README-ja.rd +60 -0
- data/doc-ja/README.html +0 -0
- data/doc-ja/README.rd +0 -0
- data/doc-ja/algebra-ja.html +66 -0
- data/doc-ja/algebra-ja.rd +60 -0
- data/doc-ja/algebraic-equation-ja.html +36 -0
- data/doc-ja/algebraic-equation-ja.rd +26 -0
- data/doc-ja/algebraic-extension-field-ja.html +122 -0
- data/doc-ja/algebraic-extension-field-ja.rd +118 -0
- data/doc-ja/algebraic-parser-ja.html +87 -0
- data/doc-ja/algebraic-parser-ja.rd +95 -0
- data/doc-ja/changes.html +161 -0
- data/doc-ja/changes.rd +119 -0
- data/doc-ja/elementary-divisor-ja.html +56 -0
- data/doc-ja/elementary-divisor-ja.rd +45 -0
- data/doc-ja/euclidian-ring-ja.html +78 -0
- data/doc-ja/euclidian-ring-ja.rd +69 -0
- data/doc-ja/finite-group-ja.html +285 -0
- data/doc-ja/finite-group-ja.rd +276 -0
- data/doc-ja/finite-map-ja.html +224 -0
- data/doc-ja/finite-map-ja.rd +227 -0
- data/doc-ja/finite-set-ja.html +393 -0
- data/doc-ja/finite-set-ja.rd +408 -0
- data/doc-ja/index-ja.html +113 -0
- data/doc-ja/index-ja.rd +112 -0
- data/doc-ja/jordan-form-ja.html +106 -0
- data/doc-ja/jordan-form-ja.rd +99 -0
- data/doc-ja/localized-ring-ja.html +121 -0
- data/doc-ja/localized-ring-ja.rd +131 -0
- data/doc-ja/m-polynomial-ja.html +542 -0
- data/doc-ja/m-polynomial-ja.rd +596 -0
- data/doc-ja/matrix-algebra-ja.html +686 -0
- data/doc-ja/matrix-algebra-ja.rd +727 -0
- data/doc-ja/matrix-algebra-triplet-ja.html +124 -0
- data/doc-ja/matrix-algebra-triplet-ja.rd +129 -0
- data/doc-ja/permutation-group-ja.html +159 -0
- data/doc-ja/permutation-group-ja.rd +151 -0
- data/doc-ja/polynomial-converter-ja.html +64 -0
- data/doc-ja/polynomial-converter-ja.rd +54 -0
- data/doc-ja/polynomial-ja.html +446 -0
- data/doc-ja/polynomial-ja.rd +473 -0
- data/doc-ja/residue-class-ring-ja.html +112 -0
- data/doc-ja/residue-class-ring-ja.rd +113 -0
- data/doc-ja/sample-algebraic-equation01.rb.v.rd +11 -0
- data/doc-ja/sample-algebraic-equation02.rb.v.rd +11 -0
- data/doc-ja/sample-algebraic-root01.rb.v.rd +20 -0
- data/doc-ja/sample-algebraicfield01.rb.v.rd +26 -0
- data/doc-ja/sample-algebraicfield02.rb.v.rd +15 -0
- data/doc-ja/sample-cayleyhamilton01.rb.v.rd +14 -0
- data/doc-ja/sample-diagonalization01.rb.v.rd +48 -0
- data/doc-ja/sample-divmod01.rb.v.rd +17 -0
- data/doc-ja/sample-elementary-divisor01.rb.v.rd +48 -0
- data/doc-ja/sample-factorize01.rb.v.rd +11 -0
- data/doc-ja/sample-factorize02.rb.v.rd +13 -0
- data/doc-ja/sample-factorize03.rb.v.rd +14 -0
- data/doc-ja/sample-factorize04.rb.v.rd +14 -0
- data/doc-ja/sample-factorize05.rb.v.rd +53 -0
- data/doc-ja/sample-galois-group01.rb.v.rd +27 -0
- data/doc-ja/sample-gaussian-elimination01.rb.v.rd +19 -0
- data/doc-ja/sample-geometry01.rb.v.rd +33 -0
- data/doc-ja/sample-geometry02.rb.v.rd +34 -0
- data/doc-ja/sample-geometry03.rb.v.rd +45 -0
- data/doc-ja/sample-geometry04.rb.v.rd +33 -0
- data/doc-ja/sample-geometry07.rb.v.rd +62 -0
- data/doc-ja/sample-groebner01.rb.v.rd +13 -0
- data/doc-ja/sample-groebner02.rb.v.rd +18 -0
- data/doc-ja/sample-groebner03.rb.v.rd +19 -0
- data/doc-ja/sample-group01.rb.v.rd +21 -0
- data/doc-ja/sample-jordan-form01.rb.v.rd +56 -0
- data/doc-ja/sample-jordanform01.rb.v.rd +55 -0
- data/doc-ja/sample-lagrange-multiplier01.rb.v.rd +35 -0
- data/doc-ja/sample-m-factorize01.rb.v.rd +15 -0
- data/doc-ja/sample-m-factorize02.rb.v.rd +12 -0
- data/doc-ja/sample-m-polynomial01.rb.v.rd +10 -0
- data/doc-ja/sample-map01.rb.v.rd +9 -0
- data/doc-ja/sample-polynomial01.rb.v.rd +9 -0
- data/doc-ja/sample-polynomial02.rb.v.rd +11 -0
- data/doc-ja/sample-primefield01.rb.v.rd +13 -0
- data/doc-ja/sample-quotientfield01.rb.v.rd +11 -0
- data/doc-ja/sample-quotientfield02.rb.v.rd +18 -0
- data/doc-ja/sample-quotientfield03.rb.v.rd +16 -0
- data/doc-ja/sample-quotientfield04.rb.v.rd +16 -0
- data/doc-ja/sample-set01.rb.v.rd +18 -0
- data/doc-ja/sample-splitting-field01.rb.v.rd +19 -0
- data/doc-ja/samples-ja.html +885 -0
- data/doc-ja/samples-ja.rd +221 -0
- data/doc-ja/style.css +85 -0
- data/doc-ja/todo.html +20 -0
- data/doc-ja/todo.rd +9 -0
- data/lib/algebra.rb +36 -0
- data/lib/algebra/algebraic-equation.rb +56 -0
- data/lib/algebra/algebraic-extension-field.rb +135 -0
- data/lib/algebra/algebraic-parser.rb +160 -0
- data/lib/algebra/algebraic-system.rb +224 -0
- data/lib/algebra/annihilate.rb +52 -0
- data/lib/algebra/array-supplement.rb +53 -0
- data/lib/algebra/auto-require.rb +84 -0
- data/lib/algebra/chinese-rem-th.rb +135 -0
- data/lib/algebra/combinatorial.rb +145 -0
- data/lib/algebra/elementary-divisor.rb +193 -0
- data/lib/algebra/euclidian-ring.rb +161 -0
- data/lib/algebra/factors.rb +305 -0
- data/lib/algebra/finite-group.rb +374 -0
- data/lib/algebra/finite-map.rb +201 -0
- data/lib/algebra/finite-set.rb +456 -0
- data/lib/algebra/galois-group.rb +129 -0
- data/lib/algebra/gaussian-elimination.rb +385 -0
- data/lib/algebra/groebner-basis-coeff.rb +228 -0
- data/lib/algebra/groebner-basis.rb +197 -0
- data/lib/algebra/import-module-single-thread.rb +86 -0
- data/lib/algebra/import-module.rb +491 -0
- data/lib/algebra/jordan-form.rb +114 -0
- data/lib/algebra/linear-algebra.rb +143 -0
- data/lib/algebra/localized-ring.rb +294 -0
- data/lib/algebra/m-index.rb +282 -0
- data/lib/algebra/m-polynomial-factor-int.rb +186 -0
- data/lib/algebra/m-polynomial-factor-zp.rb +114 -0
- data/lib/algebra/m-polynomial-factor.rb +315 -0
- data/lib/algebra/m-polynomial-gcd.rb +40 -0
- data/lib/algebra/m-polynomial.rb +875 -0
- data/lib/algebra/matrix-algebra-triplet.rb +292 -0
- data/lib/algebra/matrix-algebra.rb +929 -0
- data/lib/algebra/numeric-supplement.rb +123 -0
- data/lib/algebra/permutation-group.rb +257 -0
- data/lib/algebra/polynomial-converter.rb +193 -0
- data/lib/algebra/polynomial-factor-alg.rb +148 -0
- data/lib/algebra/polynomial-factor-int.rb +252 -0
- data/lib/algebra/polynomial-factor-zp.rb +165 -0
- data/lib/algebra/polynomial-factor.rb +140 -0
- data/lib/algebra/polynomial.rb +592 -0
- data/lib/algebra/powers.rb +31 -0
- data/lib/algebra/prime-gen.rb +32 -0
- data/lib/algebra/rational.rb +81 -0
- data/lib/algebra/residue-class-ring.rb +219 -0
- data/lib/algebra/sets-system.rb +43 -0
- data/lib/algebra/splitting-field.rb +103 -0
- data/lib/algebra/version.rb +3 -0
- data/sample/Makefile +10 -0
- data/sample/do-testscripts.rb +100 -0
- data/sample/sample-algebraic-equation01.rb +6 -0
- data/sample/sample-algebraic-equation02.rb +6 -0
- data/sample/sample-algebraic-root01.rb +15 -0
- data/sample/sample-algebraicfield01.rb +21 -0
- data/sample/sample-algebraicfield02.rb +10 -0
- data/sample/sample-cayleyhamilton01.rb +9 -0
- data/sample/sample-diagonalization01.rb +43 -0
- data/sample/sample-divmod01.rb +12 -0
- data/sample/sample-elementary-divisor01.rb +43 -0
- data/sample/sample-factorize01.rb +6 -0
- data/sample/sample-factorize02.rb +8 -0
- data/sample/sample-factorize03.rb +9 -0
- data/sample/sample-factorize04.rb +9 -0
- data/sample/sample-factorize05.rb +48 -0
- data/sample/sample-galois-group01.rb +22 -0
- data/sample/sample-gaussian-elimination01.rb +14 -0
- data/sample/sample-geometry01.rb +28 -0
- data/sample/sample-geometry02.rb +29 -0
- data/sample/sample-geometry03.rb +40 -0
- data/sample/sample-geometry04.rb +28 -0
- data/sample/sample-geometry07.rb +58 -0
- data/sample/sample-groebner01.rb +8 -0
- data/sample/sample-groebner02.rb +13 -0
- data/sample/sample-groebner03.rb +14 -0
- data/sample/sample-group01.rb +16 -0
- data/sample/sample-jordan-form01.rb +51 -0
- data/sample/sample-lagrange-multiplier01.rb +30 -0
- data/sample/sample-m-factorize01.rb +10 -0
- data/sample/sample-m-factorize02.rb +7 -0
- data/sample/sample-m-polynomial01.rb +5 -0
- data/sample/sample-map01.rb +4 -0
- data/sample/sample-polynomial01.rb +4 -0
- data/sample/sample-polynomial02.rb +6 -0
- data/sample/sample-primefield01.rb +8 -0
- data/sample/sample-quotientfield01.rb +6 -0
- data/sample/sample-quotientfield02.rb +13 -0
- data/sample/sample-quotientfield03.rb +11 -0
- data/sample/sample-quotientfield04.rb +11 -0
- data/sample/sample-set01.rb +13 -0
- data/sample/sample-splitting-field01.rb +14 -0
- data/sample/test-00-cayley-hamilton.rb +76 -0
- data/sample/test-00-groebner-basis.rb +274 -0
- data/sample/test-00-polynomial-factor-alg.rb +89 -0
- data/sample/test-00.list +4 -0
- data/sample/time-trial.rb +65 -0
- metadata +373 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 61e7ff2a37b2e5c964ee4f11a24c9526d293c73e
|
4
|
+
data.tar.gz: 1d27559fcf49ae17c8c269383d372a3b5a532d60
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4e06331f4a5e90361ea5a8d86b4917fc74ab9de831c261bb7db4cc17ae941666b7e00814065bc5a2287dff88eab349da7fd8143f8e80c81f86d1ba6b0d36e313
|
7
|
+
data.tar.gz: fcebd33daa128112ffa3e4517f0631bd374524fe6fdd95f8167690a5d416f2ab5c1db3c74ace4a7cde843edff292641c3fa0b746abd6154fff68d7912625ef26
|
data/.gitignore
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
.ruby-version
|
47
|
+
.ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
51
|
+
|
52
|
+
.DS_Store
|
53
|
+
html
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at t.kunishi@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
algebra (0.2.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
minitest (5.9.0)
|
10
|
+
power_assert (0.3.0)
|
11
|
+
rake (11.2.2)
|
12
|
+
rdtool (0.6.38)
|
13
|
+
test-unit (3.2.1)
|
14
|
+
power_assert
|
15
|
+
|
16
|
+
PLATFORMS
|
17
|
+
ruby
|
18
|
+
|
19
|
+
DEPENDENCIES
|
20
|
+
algebra!
|
21
|
+
bundler (~> 1.12)
|
22
|
+
minitest (~> 5.0)
|
23
|
+
rake
|
24
|
+
rdtool
|
25
|
+
test-unit
|
26
|
+
|
27
|
+
BUNDLED WITH
|
28
|
+
1.12.5
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Takeo Kunishima
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README-ja.txt
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
|
2
|
+
代数パッケージ
|
3
|
+
|
4
|
+
2006.09.16
|
5
|
+
|
6
|
+
・ Version: 0.72
|
7
|
+
・ 著者: 原信一郎
|
8
|
+
・ e-mail: sinara@blade.nagaokaut.ac.jp
|
9
|
+
・ Home Page: <URL:http://blade.nagaokaut.ac.jp/~sinara/ruby/math/>
|
10
|
+
|
11
|
+
これは、、、
|
12
|
+
|
13
|
+
1変数あるいは多変数の多項式を計算するためのライブラリです。数学的対象を自然に
|
14
|
+
Ruby で表現可能にする事を目的にしています。スピードはありませんが、スクリプト言
|
15
|
+
語なのでアルゴリズムを見る事ができます。
|
16
|
+
|
17
|
+
・ 一変数多項式
|
18
|
+
□ 加法、乗法、商/剰余等の演算
|
19
|
+
□ 因数分解
|
20
|
+
□ Galois 群
|
21
|
+
|
22
|
+
・ 多変数多項式
|
23
|
+
□ 加法、乗法等の演算
|
24
|
+
□ 因数分解
|
25
|
+
□ グレブナ基底の生成、グレブナ基底による商/剰余の演算
|
26
|
+
|
27
|
+
・ 代数系
|
28
|
+
□ 商体の生成
|
29
|
+
□ 剰余環の生成
|
30
|
+
□ 行列環の生成
|
31
|
+
□ 置換群の計算
|
32
|
+
|
33
|
+
・ 集合と写像
|
34
|
+
|
35
|
+
インストール
|
36
|
+
|
37
|
+
このパッケージを利用するにはまず、オブジェクト指向スクリプト言語 Ruby (<URL:
|
38
|
+
http://www.ruby-lang.org/>参照) が必要です。
|
39
|
+
|
40
|
+
更に、アーカイブの展開後
|
41
|
+
bundle install
|
42
|
+
|
43
|
+
とすれば、lib ディレクトリ以下を、ロード可能なディレクトリにコピーし、インスト
|
44
|
+
ールが完了します。
|
45
|
+
|
46
|
+
使い方・サンプル
|
47
|
+
|
48
|
+
doc ディレクトリの index-ja.html を見てください。マニュアルやサンプルがあります
|
49
|
+
。
|
50
|
+
|
51
|
+
参考
|
52
|
+
|
53
|
+
・ D.コックス, J.リトル and D.オシー, "グレブナ基底と代数多様体入門(上・下
|
54
|
+
)", 2000,シュプリンガー・フェアラーク東京
|
55
|
+
・ 児玉宏児, "Polynomial", <URL:http://www.math.kobe-u.ac.jp/HOME/kodama/
|
56
|
+
tips-RubyPoly.html>
|
57
|
+
・ H.Anai, M.Noro and K.Yokoyama, "Computation of the splitting fields and
|
58
|
+
the Galois groups of polynomials", Progres in Mathematics, 28-50, Vo.143,
|
59
|
+
1996
|
60
|
+
|
data/README.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
|
2
|
+
# Algebra
|
3
|
+
|
4
|
+
2006.09.14
|
5
|
+
|
6
|
+
* Version: 0.72
|
7
|
+
* Author: Shin-ichiro HARA
|
8
|
+
* e-mail: sinara@blade.nagaokaut.ac.jp
|
9
|
+
* Home Page: <URL:http://blade.nagaokaut.ac.jp/~sinara/ruby/math/>
|
10
|
+
|
11
|
+
## Preface
|
12
|
+
|
13
|
+
This is a library for mathematical computations. Our purpose is to express the
|
14
|
+
mathematical object naturally in Ruby. Though it is not operated fast, we can
|
15
|
+
see the algorithm of the mathematical processing not in black box but in
|
16
|
+
scripts.
|
17
|
+
|
18
|
+
This library is in development stage. At present, things we can handle are as
|
19
|
+
follows:
|
20
|
+
|
21
|
+
* One-variate polynomial
|
22
|
+
+ Fundamental operations (addition, multiplication, quotient/remainder,
|
23
|
+
...)
|
24
|
+
+ factorization
|
25
|
+
+ Galois group
|
26
|
+
* Multi-variate polynomial
|
27
|
+
+ Fundamental operations (addition, multiplication, ...)
|
28
|
+
+ factorization
|
29
|
+
+ Creating Groebner-basis, quotient/remainder by Groebner-basis.
|
30
|
+
* Algebraic systems
|
31
|
+
+ Creating quotient fields
|
32
|
+
+ Creating residue class fields
|
33
|
+
+ Operating matrices
|
34
|
+
+ Operating permutation groups
|
35
|
+
* Sets and Maps
|
36
|
+
|
37
|
+
## Installation
|
38
|
+
|
39
|
+
Install Ruby (See: <URL:http://www.ruby-lang.org/> ).
|
40
|
+
|
41
|
+
After expanding this archive, do
|
42
|
+
```
|
43
|
+
bundle install
|
44
|
+
```
|
45
|
+
|
46
|
+
Then all files and directories under lib are copyed in the directory where Ruby
|
47
|
+
can load.
|
48
|
+
|
49
|
+
## Usage and Samples
|
50
|
+
|
51
|
+
See index.html in doc directory, where manuals and sample codes are.
|
52
|
+
|
53
|
+
## Reference
|
54
|
+
|
55
|
+
* D.Cox, J.Little and D.O'Shea, "IDEALS, VARIETIES AND ALGORITHMS", 1997,
|
56
|
+
Springer.
|
57
|
+
* K. Kodama, "Polynomial", http://www.math.kobe-u.ac.jp/HOME/kodama/tips-RubyPoly.html
|
58
|
+
* H.Anai, M.Noro and K.Yokoyama, "Computation of the splitting fields and
|
59
|
+
the Galois groups of polynomials", Progres in Mathematics, 28-50, Vo.143,
|
60
|
+
1996
|
61
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
task default: :test
|
5
|
+
|
6
|
+
desc 'test'
|
7
|
+
task :test do
|
8
|
+
[:newtest, :newtest_aef, :newtest_finite_set, :newtest_mathn].each do |task|
|
9
|
+
Rake::Task[task].invoke
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
Rake::TestTask.new(:newtest) do |t|
|
14
|
+
t.libs << 'test'
|
15
|
+
t.test_files = FileList['test/test-*.rb']
|
16
|
+
t.verbose = true
|
17
|
+
end
|
18
|
+
|
19
|
+
Rake::TestTask.new(:newtest_aef) do |t|
|
20
|
+
t.libs << 'test/aef'
|
21
|
+
t.test_files = FileList['test/aef/test-*.rb']
|
22
|
+
t.verbose = true
|
23
|
+
end
|
24
|
+
|
25
|
+
Rake::TestTask.new(:newtest_finite_set) do |t|
|
26
|
+
t.libs << 'test/finite-set'
|
27
|
+
t.test_files = FileList['test/finite-set/test-*.rb']
|
28
|
+
t.verbose = true
|
29
|
+
end
|
30
|
+
|
31
|
+
Rake::TestTask.new(:newtest_mathn) do |t|
|
32
|
+
t.libs << 'test/mathn'
|
33
|
+
t.test_files = FileList['test/mathn/test-*.rb']
|
34
|
+
t.verbose = true
|
35
|
+
end
|
36
|
+
|
37
|
+
Dir.glob('test/**/test*.rb') do |file|
|
38
|
+
Rake::TestTask.new(file) do |t|
|
39
|
+
t.libs << 'test'
|
40
|
+
t.test_files = FileList[file]
|
41
|
+
t.verbose = true
|
42
|
+
end
|
43
|
+
end
|
data/algebra.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'algebra/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "algebra"
|
8
|
+
spec.version = Algebra::VERSION
|
9
|
+
spec.authors = ["Takeo Kunishima"]
|
10
|
+
spec.email = ["t.kunishi@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{a library for mathematical computations.}
|
13
|
+
spec.description = %q{This is a library for mathematical computations. Our purpose is to express the mathematical object naturally in Ruby. Though it is not operated fast, we can see the algorithm of the mathematical processing not in black box but in scripts. This library is in development stage.}
|
14
|
+
spec.homepage = "https://github.com/kunishi/algebra-ruby2"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
#if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
#else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
#end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
33
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "algebra"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,69 @@
|
|
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/README-ja.rd</title>
|
9
|
+
<link href="style.css" type="text/css" rel="stylesheet" />
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<h1><a name="label-0" id="label-0">代数パッケージ</a></h1><!-- RDLabel: "代数パッケージ" -->
|
13
|
+
<p>2006.09.16</p>
|
14
|
+
<ul>
|
15
|
+
<li>Version: 0.72</li>
|
16
|
+
<li>著者: 原 信一郎</li>
|
17
|
+
<li>e-mail: sinara@blade.nagaokaut.ac.jp</li>
|
18
|
+
<li>Home Page: <a href="http://blade.nagaokaut.ac.jp/~sinara/ruby/math/"><URL:http://blade.nagaokaut.ac.jp/~sinara/ruby/math/></a></li>
|
19
|
+
</ul>
|
20
|
+
<h2><a name="label-1" id="label-1">これは、、、</a></h2><!-- RDLabel: "これは、、、" -->
|
21
|
+
<p>1変数あるいは多変数の多項式を計算するためのライブラリです。
|
22
|
+
数学的対象を自然に Ruby で表現可能にする事を目的にしています。
|
23
|
+
スピードはありませんが、スクリプト言語なのでアルゴリズムを見る事
|
24
|
+
ができます。</p>
|
25
|
+
<ul>
|
26
|
+
<li>一変数多項式
|
27
|
+
<ul>
|
28
|
+
<li>加法、乗法、商/剰余等の演算</li>
|
29
|
+
<li>因数分解</li>
|
30
|
+
<li>Galois 群</li>
|
31
|
+
</ul></li>
|
32
|
+
<li>多変数多項式
|
33
|
+
<ul>
|
34
|
+
<li>加法、乗法等の演算</li>
|
35
|
+
<li>因数分解</li>
|
36
|
+
<li>グレブナ基底の生成、グレブナ基底による商/剰余の演算</li>
|
37
|
+
</ul></li>
|
38
|
+
<li>代数系
|
39
|
+
<ul>
|
40
|
+
<li>商体の生成</li>
|
41
|
+
<li>剰余環の生成</li>
|
42
|
+
<li>行列環の生成</li>
|
43
|
+
<li>置換群の計算</li>
|
44
|
+
</ul></li>
|
45
|
+
<li>集合と写像</li>
|
46
|
+
</ul>
|
47
|
+
<h2><a name="label-2" id="label-2">インストール</a></h2><!-- RDLabel: "インストール" -->
|
48
|
+
<p>このパッケージを利用するにはまず、オブジェクト指向スクリプト言語 Ruby
|
49
|
+
(<a href="http://www.ruby-lang.org/"><URL:http://www.ruby-lang.org/></a>参照) が必要です。</p>
|
50
|
+
<p>更に、アーカイブの展開後</p>
|
51
|
+
<pre>ruby install.rb</pre>
|
52
|
+
<p>とすれば、lib ディレクトリ以下を、ロード可能なディレクトリにコピーし、
|
53
|
+
インストールが完了します。</p>
|
54
|
+
<p>速度の点から、有理数は標準添付の rational.rb ではなく、拡張ライブラリ
|
55
|
+
(<a href="http://blade.nagaokaut.ac.jp/~sinara/ruby/rational/"><URL:http://blade.nagaokaut.ac.jp/~sinara/ruby/rational/></a>
|
56
|
+
を使うことを勧めます。</p>
|
57
|
+
<h2><a name="label-3" id="label-3">使い方・サンプル</a></h2><!-- RDLabel: "使い方・サンプル" -->
|
58
|
+
<p>doc ディレクトリの <a href="index-ja.html">index-ja.html</a> を見てください。
|
59
|
+
マニュアルやサンプルがあります。</p>
|
60
|
+
<h2><a name="label-4" id="label-4">参考</a></h2><!-- RDLabel: "参考" -->
|
61
|
+
<ul>
|
62
|
+
<li>D.コックス, J.リトル and D.オシー, "グレブナ基底と代数多様体入門(上・下)",
|
63
|
+
2000,シュプリンガー・フェアラーク東京</li>
|
64
|
+
<li>児玉宏児, "Polynomial", <a href="http://www.math.kobe-u.ac.jp/HOME/kodama/tips-RubyPoly.html"><URL:http://www.math.kobe-u.ac.jp/HOME/kodama/tips-RubyPoly.html></a></li>
|
65
|
+
<li>H.Anai, M.Noro and K.Yokoyama, "Computation of the splitting fields and the Galois groups of polynomials", Progres in Mathematics, 28-50, Vo.143, 1996</li>
|
66
|
+
</ul>
|
67
|
+
|
68
|
+
</body>
|
69
|
+
</html>
|