Merge pull request #5 from wontruefree/updates

use crystal 1.0 and add ameba
This commit is contained in:
Chris Watson 2021-08-08 16:05:00 -06:00 committed by GitHub
commit 707812559d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -4,6 +4,11 @@ version: 0.1.0
authors:
- Chris Watson <chris@watzon.tech>
crystal: 0.28.0
crystal: "> 0.28.0"
development_dependencies:
ameba:
github: veelenga/ameba
version: "~> 0.14"
license: MIT

View File

@ -1161,7 +1161,6 @@ module Apatite
size = row_count
last = size - 1
a = to_a
no_pivot = Proc(Int32).new { return 0 }
sign = +1
pivot = 1
size.times do |k|
@ -1178,7 +1177,7 @@ module Apatite
(k + 1).upto(last) do |i|
ai = a[i]
(k + 1).upto(last) do |j|
ai[j] = (pivot * ai[j] - ai[k] * a[k][j]) / previous_pivot
ai[j] = (pivot * ai[j] - ai[k] * a[k][j]) // previous_pivot
end
end
end
@ -1225,7 +1224,7 @@ module Apatite
(pivot_row + 1).upto(last_row) do |i|
ai = a[i]
(k + 1).upto(last_column) do |j|
ai[j] = (pivot * ai[j] - ai[k] * a[pivot_row][j]) / previous_pivot
ai[j] = (pivot * ai[j] - ai[k] * a[pivot_row][j]) // previous_pivot
end
end
pivot_row += 1