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

Add function to sample non zero random vector. #49

Merged
merged 2 commits into from
May 2, 2024

Conversation

ple13
Copy link
Contributor

@ple13 ple13 commented Apr 30, 2024

No description provided.

@wfa-reviewable
Copy link

This change is Reviewable

Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @kungfucraig, @ple13, and @renjiezh)


src/main/cc/math/uniform_pseudorandom_generator.h line 50 at r1 (raw file):

      int64_t size, uint32_t modulus) = 0;

  // Generates uniformly random values in the range [1, modulus).

nit: shouldn't this have the same summary fragment as GenerateUniformRandomRange, only including the non-zero part?

Copy link
Member

@kungfucraig kungfucraig left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ple13 and @renjiezh)

Copy link
Contributor Author

@ple13 ple13 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 4 files reviewed, all discussions resolved (waiting on @kungfucraig, @renjiezh, and @SanjayVas)


src/main/cc/math/uniform_pseudorandom_generator.h line 50 at r1 (raw file):

Previously, SanjayVas (Sanjay Vasandani) wrote…

nit: shouldn't this have the same summary fragment as GenerateUniformRandomRange, only including the non-zero part?

Done.

Copy link
Member

@kungfucraig kungfucraig left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @renjiezh, @SanjayVas, and @stevenwarejones)

Copy link

@stevenwarejones stevenwarejones left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 4 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ple13, @renjiezh, and @SanjayVas)


src/main/cc/math/open_ssl_uniform_random_generator.cc line 166 at r2 (raw file):

  }

  if (size < 0) {

in what scenario is size == 0 valid?

Copy link
Contributor Author

@ple13 ple13 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @renjiezh, @SanjayVas, and @stevenwarejones)


src/main/cc/math/open_ssl_uniform_random_generator.cc line 166 at r2 (raw file):

Previously, stevenwarejones (Steven Ware Jones) wrote…

in what scenario is size == 0 valid?

Size = 0 is a singularity case, where the return is an empty array. I'm not sure if this will ever be used in practice, but it could happen when we call prng->GenerateNonZeroUniformRandomRange(otherArray.size()) where the otherArray is an empty one.

Copy link
Contributor

@renjiezh renjiezh left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @SanjayVas and @stevenwarejones)

Copy link

@stevenwarejones stevenwarejones left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SanjayVas)

@ple13 ple13 merged commit f6568de into main May 2, 2024
3 checks passed
@ple13 ple13 deleted the lephi-add-function-to-sample-non-zero-vector branch May 2, 2024 16:43
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.

6 participants