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 reusable counterpart of WeightedIndex #1460

Closed
wants to merge 7 commits into from

Conversation

maratik123
Copy link

@maratik123 maratik123 commented Jun 15, 2024

  • Added a CHANGELOG.md entry

Summary

Add reusable counterpart of WeightedIndex

Motivation

This solves #1459

Details

Add new module to implement ReusableWeightedIndex

/// Just a wrapper to surround internal persistent storage to reuse in [`ReusableWeightedIndex`]
/// instances.
#[derive(Debug, Clone, PartialEq)]
pub struct CumulativeWeightsWrapper<X> {
Copy link
Author

@maratik123 maratik123 Jun 16, 2024

Choose a reason for hiding this comment

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

May be it will be useful to replace it with slice container to allow somebody to use stack-allocated container (via smallvec for example). But it will require additional checks on filling with weights

@dhardy
Copy link
Member

dhardy commented Jul 8, 2024

Status: counter-proposals; see #1459.

@dhardy dhardy added the D-changes Do: changes requested label Jul 8, 2024
@dhardy dhardy added the X-stale Outdated or abandoned work label Nov 12, 2024
@dhardy dhardy closed this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-changes Do: changes requested X-stale Outdated or abandoned work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants