matrix 0.1.0 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{LICENSE.txt → BSDL} +3 -3
- data/COPYING +56 -0
- data/lib/matrix/eigenvalue_decomposition.rb +883 -0
- data/lib/matrix/lup_decomposition.rb +219 -0
- data/lib/matrix/version.rb +5 -0
- data/lib/matrix.rb +302 -181
- data/matrix.gemspec +12 -7
- metadata +14 -45
- data/.gitignore +0 -9
- data/.travis.yml +0 -4
- data/Gemfile +0 -6
- data/README.md +0 -41
- data/Rakefile +0 -10
- data/bin/console +0 -14
- data/bin/setup +0 -8
data/matrix.gemspec
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
begin
|
|
4
|
+
require_relative "lib/matrix/version"
|
|
5
|
+
rescue LoadError
|
|
6
|
+
# for Ruby core repository
|
|
7
|
+
require_relative "version"
|
|
8
|
+
end
|
|
9
|
+
|
|
3
10
|
Gem::Specification.new do |spec|
|
|
4
11
|
spec.name = "matrix"
|
|
5
|
-
spec.version =
|
|
12
|
+
spec.version = Matrix::VERSION
|
|
6
13
|
spec.authors = ["Marc-Andre Lafortune"]
|
|
7
14
|
spec.email = ["ruby-core@marc-andre.ca"]
|
|
8
15
|
|
|
9
16
|
spec.summary = %q{An implementation of Matrix and Vector classes.}
|
|
10
17
|
spec.description = %q{An implementation of Matrix and Vector classes.}
|
|
11
18
|
spec.homepage = "https://github.com/ruby/matrix"
|
|
12
|
-
spec.
|
|
19
|
+
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
|
20
|
+
spec.required_ruby_version = ">= 2.5.0"
|
|
13
21
|
|
|
14
|
-
spec.files = ["
|
|
22
|
+
spec.files = ["COPYING", "BSDL", "lib/matrix.rb", "lib/matrix/eigenvalue_decomposition.rb", "lib/matrix/lup_decomposition.rb", "lib/matrix/version.rb", "matrix.gemspec"]
|
|
15
23
|
spec.bindir = "exe"
|
|
16
|
-
spec.executables =
|
|
24
|
+
spec.executables = []
|
|
17
25
|
spec.require_paths = ["lib"]
|
|
18
|
-
|
|
19
|
-
spec.add_development_dependency "bundler"
|
|
20
|
-
spec.add_development_dependency "rake"
|
|
21
26
|
end
|
metadata
CHANGED
|
@@ -1,43 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: matrix
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marc-Andre Lafortune
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: bundler
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: rake
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
11
|
+
date: 2025-06-18 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
41
13
|
description: An implementation of Matrix and Vector classes.
|
|
42
14
|
email:
|
|
43
15
|
- ruby-core@marc-andre.ca
|
|
@@ -45,21 +17,19 @@ executables: []
|
|
|
45
17
|
extensions: []
|
|
46
18
|
extra_rdoc_files: []
|
|
47
19
|
files:
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
- Gemfile
|
|
51
|
-
- LICENSE.txt
|
|
52
|
-
- README.md
|
|
53
|
-
- Rakefile
|
|
54
|
-
- bin/console
|
|
55
|
-
- bin/setup
|
|
20
|
+
- BSDL
|
|
21
|
+
- COPYING
|
|
56
22
|
- lib/matrix.rb
|
|
23
|
+
- lib/matrix/eigenvalue_decomposition.rb
|
|
24
|
+
- lib/matrix/lup_decomposition.rb
|
|
25
|
+
- lib/matrix/version.rb
|
|
57
26
|
- matrix.gemspec
|
|
58
27
|
homepage: https://github.com/ruby/matrix
|
|
59
28
|
licenses:
|
|
29
|
+
- Ruby
|
|
60
30
|
- BSD-2-Clause
|
|
61
31
|
metadata: {}
|
|
62
|
-
post_install_message:
|
|
32
|
+
post_install_message:
|
|
63
33
|
rdoc_options: []
|
|
64
34
|
require_paths:
|
|
65
35
|
- lib
|
|
@@ -67,16 +37,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
67
37
|
requirements:
|
|
68
38
|
- - ">="
|
|
69
39
|
- !ruby/object:Gem::Version
|
|
70
|
-
version:
|
|
40
|
+
version: 2.5.0
|
|
71
41
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
42
|
requirements:
|
|
73
43
|
- - ">="
|
|
74
44
|
- !ruby/object:Gem::Version
|
|
75
45
|
version: '0'
|
|
76
46
|
requirements: []
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
signing_key:
|
|
47
|
+
rubygems_version: 3.5.11
|
|
48
|
+
signing_key:
|
|
80
49
|
specification_version: 4
|
|
81
50
|
summary: An implementation of Matrix and Vector classes.
|
|
82
51
|
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/README.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Matrix
|
|
2
|
-
|
|
3
|
-
An implementation of `Matrix` and `Vector` classes.
|
|
4
|
-
|
|
5
|
-
The `Matrix` class represents a mathematical matrix. It provides methods for creating matrices, operating on them arithmetically and algebraically, and determining their mathematical properties (trace, rank, inverse, determinant).
|
|
6
|
-
|
|
7
|
-
The `Vector` class represents a mathematical vector, which is useful in its own right, and also constitutes a row or column of a `Matrix`.
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
10
|
-
|
|
11
|
-
Add this line to your application's Gemfile:
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
gem 'matrix'
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
And then execute:
|
|
18
|
-
|
|
19
|
-
$ bundle
|
|
20
|
-
|
|
21
|
-
Or install it yourself as:
|
|
22
|
-
|
|
23
|
-
$ gem install matrix
|
|
24
|
-
|
|
25
|
-
## Usage
|
|
26
|
-
|
|
27
|
-
TODO: Write usage instructions here
|
|
28
|
-
|
|
29
|
-
## Development
|
|
30
|
-
|
|
31
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
32
|
-
|
|
33
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
34
|
-
|
|
35
|
-
## Contributing
|
|
36
|
-
|
|
37
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/matrix.
|
|
38
|
-
|
|
39
|
-
## License
|
|
40
|
-
|
|
41
|
-
The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "matrix"
|
|
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(__FILE__)
|