Mercurial > hg > may
diff yetilab/matrix/test/test_matrix.yeti @ 187:fd16551c2fc8
Implement and test rowSlice, columnSlice
author | Chris Cannam |
---|---|
date | Sun, 05 May 2013 12:41:42 +0100 |
parents | 032c4986b6b0 |
children | 9bc6070c041c |
line wrap: on
line diff
--- a/yetilab/matrix/test/test_matrix.yeti Sun May 05 12:41:29 2013 +0100 +++ b/yetilab/matrix/test/test_matrix.yeti Sun May 05 12:41:42 2013 +0100 @@ -316,6 +316,18 @@ yrt ), +"rowSlice-\(name)": \( + compareMatrices + (mat.rowSlice 1 2 (newMatrix (RowMajor ()) [[1,2],[3,4],[5,6],[7,8]])) + (newMatrix (RowMajor ()) [[3,4],[5,6]]) +), + +"columnSlice-\(name)": \( + compareMatrices + (mat.columnSlice 1 2 (newMatrix (RowMajor ()) [[1,2,3,4],[5,6,7,8]])) + (newMatrix (RowMajor ()) [[2,3],[6,7]]) +), + ]); colhash = makeTests "column-major" id;