Project

General

Profile

Feature #10057 » add_test_for_Matrix#conjugate.patch

gogotanaka (Kazuki Tanaka), 07/18/2014 05:47 AM

View differences:

test/matrix/test_matrix.rb
@m3 = @m1.clone
@m4 = Matrix[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]
@n1 = Matrix[[2,3,4], [5,6,7]]
@c1 = Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
end
def test_matrix
......
assert_equal(m.lup.solve([2, 5]), Vector[(1/1), Rational(1,2)])
end
def test_conjugate
assert_equal(Matrix[[Complex(1,-2), Complex(0,-1), 0], [1, 2, 3]], @c1.conjugate)
end
def test_row_vectors
assert_equal([Vector[1,2,3], Vector[4,5,6]], @m1.row_vectors)
end
(3-3/6)