Generalized hamming family