Equality Restricted Random Variables: Densities and Sampling Algorithms