Bug #7582

a mistake in Matrix#lup RDoc

Added by py _ over 1 year ago. Updated over 1 year ago.

[ruby-core:50946]
Status:Closed
Priority:Normal
Assignee:-
Category:-
Target version:-
ruby -v:ruby 2.0.0dev (2012-11-01) [i386-mswin32_100] Backport:

Description

http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/38300/entry/lib/matrix.rb#L1203

# l * u == a * p # => true
http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/38300/entry/lib/matrix/lup_decomposition.rb#L7
# and a m-by-m permutation matrix P so that LU = PA.

irb(main):001:0> require 'matrix'
=> true
irb(main):002:0> a = Matrix[[1, 2], [3, 4]]
=> Matrix[[1, 2], [3, 4]]
irb(main):003:0> l, u, p = a.lup
=> #
irb(main):004:0> l * u == a * p
=> false
irb(main):005:0> l * u == p * a
=> true

matrix.rb.lup.patch Magnifier (438 Bytes) py _, 12/18/2012 01:15 AM

Associated revisions

Revision 38425
Added by Zachary Scott over 1 year ago

  • lib/matrix.rb (#dup): typo in example [Bug #7582]

History

#1 Updated by Zachary Scott over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r38425.
py, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/matrix.rb (#dup): typo in example [Bug #7582]

Also available in: Atom PDF