[前][次][番号順一覧][スレッド一覧]

ruby-changes:26751

From: marcandre <ko1@a...>
Date: Mon, 14 Jan 2013 06:08:24 +0900 (JST)
Subject: [ruby-changes:26751] marcandRe: r38803 (trunk): * lib/matrix/eigenvalue_decomposition: Backport bugfix of Jama 1.0.3

marcandre	2013-01-14 06:06:39 +0900 (Mon, 14 Jan 2013)

  New Revision: 38803

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38803

  Log:
    * lib/matrix/eigenvalue_decomposition: Backport bugfix of Jama 1.0.3
      [rubyspec:df87040be371]

  Modified files:
    trunk/ChangeLog
    trunk/lib/matrix/eigenvalue_decomposition.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38802)
+++ ChangeLog	(revision 38803)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jan 14 06:06:03 2013  Marc-Andre Lafortune  <ruby-core@m...>
+
+	* lib/matrix/eigenvalue_decomposition: Backport bugfix of Jama 1.0.3
+	  [rubyspec:df87040be371]
+
 Sun Jan 13 16:45:00 2013  Zachary Scott <zachary@z...>
 
 	* ext/psych/yaml/scanner.c: Fix typos, patch by James Dabbs
Index: lib/matrix/eigenvalue_decomposition.rb
===================================================================
--- lib/matrix/eigenvalue_decomposition.rb	(revision 38802)
+++ lib/matrix/eigenvalue_decomposition.rb	(revision 38803)
@@ -659,14 +659,10 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix/eigenvalue_decomposition.rb#L659
               q = @h[k+1][k-1]
               r = (notlast ? @h[k+2][k-1] : 0.0)
               x = p.abs + q.abs + r.abs
-              if (x != 0.0)
-                p /= x
-                q /= x
-                r /= x
-              end
-            end
-            if (x == 0.0)
-              break
+              next if x == 0
+              p /= x
+              q /= x
+              r /= x
             end
             s = Math.sqrt(p * p + q * q + r * r)
             if (p < 0)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]