diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-04-30 18:04:30 -0400 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-05-01 03:25:15 -0400 |
commit | 9b5675b325c9d4533e4f3db080cd2aa019068aad (patch) | |
tree | c0278d817deaeee8846574f46a026ba277ad3ebf /test/matrix | |
parent | 07fd6dc49ba87ea2f0732851ec7628a526f3dcbd (diff) |
[ruby/matrix] Add Matrix#adjoint [#14]
Patch adapted from Alessandro Minali
Diffstat (limited to 'test/matrix')
-rw-r--r-- | test/matrix/test_matrix.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/matrix/test_matrix.rb b/test/matrix/test_matrix.rb index f963b2d06a..b134bfb3a1 100644 --- a/test/matrix/test_matrix.rb +++ b/test/matrix/test_matrix.rb @@ -807,4 +807,9 @@ class TestMatrix < Test::Unit::TestCase assert_equal false, @a3.orthogonal? assert_raise(Matrix::ErrDimensionMismatch) { @m1.orthogonal? } end + + def test_adjoint + assert_equal(Matrix[[(1-2i), 1], [(0-1i), 2], [0, 3]], @c1.adjoint) + assert_equal(Matrix.empty(0,2), @e1.adjoint) + end end |