Hypercube generalized to a class