mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/matrix.rb: shut up warning. [ruby-dev:37481] [Bug #899]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8fb2235f48
commit
67d18f7ff7
2 changed files with 15 additions and 16 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Wed Dec 17 19:23:28 2008 Keiju Ishitsuka <keiju@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/matrix.rb: shut up warning. [ruby-dev:37481] [Bug #899]
|
||||||
|
|
||||||
Wed Dec 17 15:44:28 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Dec 17 15:44:28 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_pop_m): use enum ary_take_pos_flags.
|
* array.c (rb_ary_pop_m): use enum ary_take_pos_flags.
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
# See classes Matrix and Vector for documentation.
|
# See classes Matrix and Vector for documentation.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
require "e2mmap.rb"
|
require "e2mmap.rb"
|
||||||
|
|
||||||
module ExceptionForMatrix # :nodoc:
|
module ExceptionForMatrix # :nodoc:
|
||||||
|
@ -623,22 +622,18 @@ class Matrix
|
||||||
q = a[i][k].quo(akk)
|
q = a[i][k].quo(akk)
|
||||||
a[i][k] = 0
|
a[i][k] = 0
|
||||||
|
|
||||||
(k + 1).upto(size) do
|
for j in (k + 1).. size
|
||||||
|j|
|
|
||||||
a[i][j] -= a[k][j] * q
|
a[i][j] -= a[k][j] * q
|
||||||
end
|
end
|
||||||
0.upto(size) do
|
for j in 0..size
|
||||||
|j|
|
|
||||||
@rows[i][j] -= @rows[k][j] * q
|
@rows[i][j] -= @rows[k][j] * q
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
(k + 1).upto(size) do
|
for j in (k + 1).. size
|
||||||
|j|
|
|
||||||
a[k][j] = a[k][j].quo(akk)
|
a[k][j] = a[k][j].quo(akk)
|
||||||
end
|
end
|
||||||
0.upto(size) do
|
for j in 0..size
|
||||||
|j|
|
|
||||||
@rows[k][j] = @rows[k][j].quo(akk)
|
@rows[k][j] = @rows[k][j].quo(akk)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -712,8 +707,8 @@ class Matrix
|
||||||
akk = a[k][k]
|
akk = a[k][k]
|
||||||
det *= -1
|
det *= -1
|
||||||
end
|
end
|
||||||
(k + 1).upto(size) do
|
|
||||||
|i|
|
for i in k + 1 .. size
|
||||||
q = a[i][k].quo(akk)
|
q = a[i][k].quo(akk)
|
||||||
(k + 1).upto(size) do
|
(k + 1).upto(size) do
|
||||||
|j|
|
|j|
|
||||||
|
@ -753,7 +748,8 @@ class Matrix
|
||||||
a[i], a[k] = a[k], a[i]
|
a[i], a[k] = a[k], a[i]
|
||||||
det *= -1
|
det *= -1
|
||||||
end
|
end
|
||||||
(k + 1).upto(size) do |i|
|
|
||||||
|
for i in (k + 1)..size
|
||||||
q = a[i][k].quo(a[k][k])
|
q = a[i][k].quo(a[k][k])
|
||||||
k.upto(size) do |j|
|
k.upto(size) do |j|
|
||||||
a[i][j] -= a[k][j] * q
|
a[i][j] -= a[k][j] * q
|
||||||
|
@ -823,11 +819,10 @@ class Matrix
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
(k + 1).upto(a_row_size - 1) do
|
|
||||||
|i|
|
for i in (k + 1)..(a_row_size - 1)
|
||||||
q = a[i][k].quo(akk)
|
q = a[i][k].quo(akk)
|
||||||
(k + 1).upto(a_column_size - 1) do
|
for j in (k + 1)..(a_column_size - 1)
|
||||||
|j|
|
|
||||||
a[i][j] -= a[k][j] * q
|
a[i][j] -= a[k][j] * q
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue