validation

update the block model code to fit the rectangular data; update some
code to deal with the validation part, including the calculation of the
similarity matrix and coVat algorithm.