Mercurial > repos > public > sbplib
diff +blockmatrix/isDivisionTest.m @ 579:a5f1b0267dba feature/grids
Be less strict about what is considered a block matrix
Empty blocks of different sizes are now allowed as well as empty block dimensions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2017 09:21:04 +0200 |
parents | 764438b52541 |
children |
line wrap: on
line diff
--- a/+blockmatrix/isDivisionTest.m Thu Sep 07 09:18:55 2017 +0200 +++ b/+blockmatrix/isDivisionTest.m Thu Sep 07 09:21:04 2017 +0200 @@ -4,14 +4,16 @@ function testIsDivision(testCase) cases = { + {[1 2] ,false}, % Must be a cell array + {{[1 2 3]} ,false}, % Must have two vectors + {{[],[]}, true} % No blocks is a valid blockmatrix + {{[1 2],[]} ,true}, + {{[],[1 2]} ,true}, {{[2 2 2],[1 2]} ,true}, - {{[1 2],[1 0]} ,false}, - {{[0 2],[1 1]} ,false}, - {{[1 2],[]} ,false}, + {{[1 2],[1 0]} ,true}, + {{[0 2],[1 1]} ,true}, {{[1 2],[1]} ,true}, {{[1 2],[1], [1 2 3]} ,false}, - {{[1 2 3]} ,false}, - {[1 2] ,false}, }; for i = 1:length(cases)