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 random intersperse view #278

Merged
merged 4 commits into from
Jan 5, 2024
Merged

Conversation

nahueespinosa
Copy link
Member

Proposed changes

This patch adds a new random intersperse view to help with adaptive sampling and replace the make_random_selector implementation. This is a range adaptor object that will insert values from a generator function between contiguous elements from the source range based on a given probability.

Type of change

  • 🐛 Bugfix (change which fixes an issue)
  • 🚀 Feature (change which adds functionality)
  • 📚 Documentation (change which fixes or extends documentation)

Checklist

  • Lint and unit tests (if any) pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All commits have been signed for DCO

@nahueespinosa nahueespinosa added enhancement New feature or request cpp Related to C++ code labels Jan 1, 2024
@nahueespinosa nahueespinosa self-assigned this Jan 1, 2024
Copy link
Collaborator

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

Neat.

beluga/include/beluga/views/random_intersperse.hpp Outdated Show resolved Hide resolved
beluga/test/beluga/views/test_random_intersperse.cpp Outdated Show resolved Hide resolved
This patch adds a new random intersperse view to help with adaptive
sampling and replace the `make_random_selector` implementation. This is
a range adaptor object that will insert values from a generator function
between contiguous elements from the source range based on a given
probability.

Signed-off-by: Nahuel Espinosa <nespinosa@ekumenlabs.com>
Signed-off-by: Nahuel Espinosa <nespinosa@ekumenlabs.com>
Signed-off-by: Nahuel Espinosa <nespinosa@ekumenlabs.com>
Signed-off-by: Nahuel Espinosa <nespinosa@ekumenlabs.com>
@nahueespinosa nahueespinosa merged commit c329bba into main Jan 5, 2024
8 checks passed
@nahueespinosa nahueespinosa deleted the nahuel/random-intersperse-view branch January 5, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp Related to C++ code enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants