check(p) --- check that the datastructure holding p is a valid partition
0001 function yn = check(p) 0002 % check(p) --- check that the datastructure holding p is a valid partition 0003 0004 s = full(sum(p.array,1)); % col sums should all be 1 0005 t = full(sum(p.array,2)); % row sums should all be positive 0006 yn = all(s == 1) & all(t>0);