matrix 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/matrix.rb +6 -6
- data/lib/matrix/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c8ddb0e922826f9f120eb357aa5c2680fe54a2adc10b63f2c7d3c991856130e
|
4
|
+
data.tar.gz: 7b0cdbf46462679c994526757128667dee31b98485e240f4e4a7fe58df4dc7f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0cb611a8e2b971c363f007104a3c4973412944135edad972999dd7ba8c68493f2ac971cf69e5f52143bf5f89218eb7ffb7a995751ecd0bf86b8533cb2d86155
|
7
|
+
data.tar.gz: 787cc92a9765b6150690e909e091eafba5fc5a42a73bc6dcb126f4f3d2438b923d3882d9c639e399bf9e3aab034b6e13cff67c870c0d3462a3d0ae17f572ce20
|
data/lib/matrix.rb
CHANGED
@@ -1016,7 +1016,7 @@ class Matrix
|
|
1016
1016
|
#++
|
1017
1017
|
|
1018
1018
|
#
|
1019
|
-
# Returns
|
1019
|
+
# Returns whether the two matrices contain equal elements.
|
1020
1020
|
#
|
1021
1021
|
def ==(other)
|
1022
1022
|
return false unless Matrix === other &&
|
@@ -1239,7 +1239,7 @@ class Matrix
|
|
1239
1239
|
when Integer
|
1240
1240
|
case
|
1241
1241
|
when exp == 0
|
1242
|
-
|
1242
|
+
raise ErrDimensionMismatch unless square?
|
1243
1243
|
self.class.identity(column_count)
|
1244
1244
|
when exp < 0
|
1245
1245
|
inverse.power_int(-exp)
|
@@ -2134,7 +2134,7 @@ class Vector
|
|
2134
2134
|
#++
|
2135
2135
|
|
2136
2136
|
#
|
2137
|
-
# Returns
|
2137
|
+
# Returns whether all of vectors are linearly independent.
|
2138
2138
|
#
|
2139
2139
|
# Vector.independent?(Vector[1,0], Vector[0,1])
|
2140
2140
|
# # => true
|
@@ -2152,7 +2152,7 @@ class Vector
|
|
2152
2152
|
end
|
2153
2153
|
|
2154
2154
|
#
|
2155
|
-
# Returns
|
2155
|
+
# Returns whether all of vectors are linearly independent.
|
2156
2156
|
#
|
2157
2157
|
# Vector[1,0].independent?(Vector[0,1])
|
2158
2158
|
# # => true
|
@@ -2165,7 +2165,7 @@ class Vector
|
|
2165
2165
|
end
|
2166
2166
|
|
2167
2167
|
#
|
2168
|
-
# Returns
|
2168
|
+
# Returns whether all elements are zero.
|
2169
2169
|
#
|
2170
2170
|
def zero?
|
2171
2171
|
all?(&:zero?)
|
@@ -2193,7 +2193,7 @@ class Vector
|
|
2193
2193
|
#++
|
2194
2194
|
|
2195
2195
|
#
|
2196
|
-
# Returns
|
2196
|
+
# Returns whether the two vectors have the same elements in the same order.
|
2197
2197
|
#
|
2198
2198
|
def ==(other)
|
2199
2199
|
return false unless Vector === other
|
data/lib/matrix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matrix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-Andre Lafortune
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|