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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1e195d010464fa1a56516e22f62671ab98829059b850cb960407e20d6e99834
4
- data.tar.gz: 3bd6e8d34d46d7704eba6d8f5eb2010f000541c14fd373de009b50472ed0b409
3
+ metadata.gz: 0c8ddb0e922826f9f120eb357aa5c2680fe54a2adc10b63f2c7d3c991856130e
4
+ data.tar.gz: 7b0cdbf46462679c994526757128667dee31b98485e240f4e4a7fe58df4dc7f1
5
5
  SHA512:
6
- metadata.gz: fa4026329141ac7ee02166b5e847512ee2325ddf107e72d0c0d82c25d80b19bf5c0173a01bdf7217cd43dbaa16bbdf4c2123b1fcca7b6efe9b8adc50be82db85
7
- data.tar.gz: c905e4cd30d275ee1a74d6fabca5507331edfdcbf6f2665dc2869f7d1547c6919b4eb872358676a24e032017628caef4a9e61c3f086424ffeff9a1ddab95d082
6
+ metadata.gz: b0cb611a8e2b971c363f007104a3c4973412944135edad972999dd7ba8c68493f2ac971cf69e5f52143bf5f89218eb7ffb7a995751ecd0bf86b8533cb2d86155
7
+ data.tar.gz: 787cc92a9765b6150690e909e091eafba5fc5a42a73bc6dcb126f4f3d2438b923d3882d9c639e399bf9e3aab034b6e13cff67c870c0d3462a3d0ae17f572ce20
@@ -1016,7 +1016,7 @@ class Matrix
1016
1016
  #++
1017
1017
 
1018
1018
  #
1019
- # Returns +true+ if and only if the two matrices contain equal elements.
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
- _make_sure_it_is_invertible = inverse
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 +true+ iff all of vectors are linearly independent.
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 +true+ iff all of vectors are linearly independent.
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 +true+ iff all elements are zero.
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 +true+ iff the two vectors have the same elements in the same order.
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Matrix
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
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.0
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-16 00:00:00.000000000 Z
11
+ date: 2021-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler