Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniqueness #31

Open
piccolbo opened this issue Apr 21, 2015 · 2 comments
Open

uniqueness #31

piccolbo opened this issue Apr 21, 2015 · 2 comments

Comments

@piccolbo
Copy link
Collaborator

can we set it as an option in generators? Where does it matter? rcharacter name rnamed rfactor rinteger?

@piccolbo
Copy link
Collaborator Author

for rcharacter, it's a bit more complicated than it seems. One can limit the potential for distinct values by limiting the alphabet and the length of each string. If those are low enough, it becomes impossible to guarantee uniqueness for a given output size. On the other hand, even with plenty of alphabet and string length to work with, the algorithm has a sample with replacement (to work of all settings of the parameters it needs to) which makes duplication possible for any value of the parameters, maybe unlikely but possible. So we could add a distinct option and let the generator fail when it's not possible to satisfy it, or when the parameter combination make it potentially so.

@piccolbo
Copy link
Collaborator Author

similar considerations of course for named and rnamed. One can always call make.unique when uniqueness is necessary and the details of the distribution don't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant