aboutsummaryrefslogtreecommitdiffstats
path: root/test/matrix
diff options
context:
space:
mode:
Diffstat (limited to 'test/matrix')
-rw-r--r--test/matrix/test_matrix.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/matrix/test_matrix.rb b/test/matrix/test_matrix.rb
index 0831ac6362..5b0bc968f7 100644
--- a/test/matrix/test_matrix.rb
+++ b/test/matrix/test_matrix.rb
@@ -571,6 +571,8 @@ class TestMatrix < Test::Unit::TestCase
assert_equal @e1, @e1.hstack(@e1)
assert_equal Matrix.empty(0,6), @e2.hstack(@e2)
assert_equal SubMatrix, SubMatrix.hstack(@e1).class
+ # From Vectors:
+ assert_equal Matrix[[1, 3],[2, 4]], Matrix.hstack(Vector[1,2], Vector[3, 4])
end
def test_vstack
@@ -586,6 +588,8 @@ class TestMatrix < Test::Unit::TestCase
assert_equal Matrix.empty(4,0), @e1.vstack(@e1)
assert_equal @e2, @e2.vstack(@e2)
assert_equal SubMatrix, SubMatrix.vstack(@e1).class
+ # From Vectors:
+ assert_equal Matrix[[1],[2],[3]], Matrix.vstack(Vector[1,2], Vector[3])
end
def test_eigenvalues_and_eigenvectors_symmetric