testing direct_sample! and alias_sample! for weighted sampling