Forum: Ruby-core [ruby-trunk - Bug #7582][Open] a mistake in Matrix#lup RDoc

C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 pypypy567 (py _) (Guest)
on 2012-12-17 17:15
(Received via mailing list)
Issue #7582 has been reported by pypypy567 (py _).

----------------------------------------
Bug #7582: a mistake in Matrix#lup RDoc
https://bugs.ruby-lang.org/issues/7582

Author: pypypy567 (py _)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-11-01) [i386-mswin32_100]


http://bugs.ruby-lang.org/projects/ruby-trunk/repo...
>   #   l * u == a * p      # => true
http://bugs.ruby-lang.org/projects/ruby-trunk/repo...
>   # and a m-by-m permutation matrix P so that L*U = P*A.


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
=> #<Matrix::LUPDecomposition:0xf813a8 @lu=[[3, 4], [(1/3), (2/3)]],
@row_size=2, @col_size=2, @pivots=[1, 0], @pivot_sign=-1>
irb(main):004:0>  l * u == a * p
=> false
irb(main):005:0>  l * u == p * a
=> true
This topic is locked and can not be replied to.