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

Feature: Add and remove choice on in the runtime #18

Closed
ahmedshafik opened this issue Apr 29, 2022 · 1 comment
Closed

Feature: Add and remove choice on in the runtime #18

ahmedshafik opened this issue Apr 29, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@ahmedshafik
Copy link

Hey,

I Just wanted to know if you can add a feature to add, remove choice in the run time without creating new choise everytime.

something like

	Choice := wr.NewChoice("hahaha", 50)
	chooser.Add(Choice)
@mroth
Copy link
Owner

mroth commented Apr 29, 2022

I believe this is a duplicate of #11. With the current algorithm used, adding or removing a choice would require regeneration of the chooser weights, which eliminates the performance invariants of the library.

I'm going to close this for now as not possible. However, if you know of a way to efficiently handle this algorithmically without an API change that I am unaware of; please feel free to re-open and document. Thanks!

@mroth mroth closed this as completed Apr 29, 2022
@mroth mroth added the enhancement New feature or request label Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants