Mercurial > repos > public > sbplib
comparison +blockmatrix/zeroTest.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 | d521e17f72b6 |
children |
comparison
equal
deleted
inserted
replaced
578:1fe16b34f114 | 579:a5f1b0267dba |
---|---|
30 }, | 30 }, |
31 { | 31 { |
32 {[1 2],[2 1]}, | 32 {[1 2],[2 1]}, |
33 {[0 0],[0];[0 0; 0 0],[0; 0]}; | 33 {[0 0],[0];[0 0; 0 0],[0; 0]}; |
34 }, | 34 }, |
35 { | |
36 {[3],[0]}, | |
37 {zeros(3,0)}, | |
38 }, | |
39 | |
40 { | |
41 {[0],[3]}, | |
42 {zeros(0,3)}, | |
43 }, | |
44 { | |
45 {[0 2],[0 3]}, | |
46 { | |
47 zeros(0,0), zeros(0,3); | |
48 zeros(2,0), zeros(2,3); | |
49 }, | |
50 }, | |
35 }; | 51 }; |
36 | 52 |
37 for i = 1:length(cases) | 53 for i = 1:length(cases) |
38 out = convertToFull(blockmatrix.zero(cases{i}{1})); | 54 out = convertToFull(blockmatrix.zero(cases{i}{1})); |
39 expected = cases{i}{2}; | 55 expected = cases{i}{2}; |