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

Implementation, testing, and examples of Fisher-Yates #137

Merged
merged 40 commits into from
Jan 24, 2024

Conversation

stefan-aws
Copy link
Collaborator

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@stefan-aws stefan-aws changed the title Implementation and testing of Fisher-Yates Implementation, testing, and examples of Fisher-Yates Jan 4, 2024
@stefan-aws stefan-aws marked this pull request as ready for review January 4, 2024 13:50
Copy link
Collaborator

@jtristan jtristan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We need to add test and doc code from Java
  2. The SecureRandom RNG will be passed to VMC (unlike for other distributions)

tests/TestsFoundational.dfy Outdated Show resolved Hide resolved
tests/TestsExternUniformPowerOfTwo.dfy Show resolved Hide resolved
src/Util/FisherYates/Interface.dfy Show resolved Hide resolved
src/Util/FisherYates/Implementation.dfy Outdated Show resolved Hide resolved
src/Util/FisherYates/Implementation.dfy Show resolved Hide resolved
src/Math/Permutations.dfy Show resolved Hide resolved
src/Math/Helper.dfy Outdated Show resolved Hide resolved
src/Math/Helper.dfy Show resolved Hide resolved
src/Util/FisherYates/Implementation.dfy Outdated Show resolved Hide resolved
dfyconfig.toml Outdated Show resolved Hide resolved
}

method TestEmpiricalIsWithin4SigmaOfTrueMean(
method TestEmpiricalIsWithin3SigmaOfTrueMean(
Copy link
Collaborator

@fzaiser fzaiser Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI: we had a threshold of 3 sigma before and quite regularly got spurious test failures with it, which is to be expected given our number of tests.

return Uniform.Implementation._Companion_Trait.UniformSample(this, n);
}

public boolean CoinSample() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A problem with doing this is that the Java API will be nicer, but is the idea that we should do this for every target?

@stefan-aws stefan-aws self-assigned this Jan 23, 2024
@jtristan jtristan merged commit 6feefb5 into main Jan 24, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants