check(p) --- check that the datastructure holding p is a valid partition
SYNOPSIS
function yn = check(p)
DESCRIPTION
check(p) --- check that the datastructure holding p is a valid partition
CROSS-REFERENCE INFORMATION
This function calls:
This function is called by:
partition partition --- constructor for the partition class
SOURCE CODE
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);