简单的matlab演示
>>a=[1,2,3,4;5,6,7,8;9,10,11,12;13,14,15,16]
a =
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
>> p = [1:2:4 2:2:4]
p =
1 3 2 4
>> b=a(p,p)
b =
1 3 2 4
9 11 10 12
5 7 6 8
13 15 14 16
The red/blackordering; this is the numbering where all nodes with coordinates(i; j)for which i+jis odd are numbered before thosefor which i+j.is even.