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

Consider adding a Counter Node for counting the number of elements in a disjoint_list #48

Closed
elham-azd opened this issue Jul 10, 2024 · 1 comment · Fixed by #50
Closed
Labels
enhancement New feature or request

Comments

@elham-azd
Copy link
Contributor

Assuming we have the following variable model.disjoint_lists(primary_set_size, num_disjoint_lists), it would be great to have a Counter Node that counts the number of elements in each disjoint_list.

@elham-azd elham-azd changed the title Consider add a Counter Node for counting the number of elements in a disjoint_list Consider adding a Counter Node for counting the number of elements in a disjoint_list Jul 10, 2024
@arcondello
Copy link
Member

So something like

model = Model()
s = model.set(5)
length = s.len()

model.states.resize(1)

with model.lock():
    assert s.state().size == length.state()

if I understand correctly?

@arcondello arcondello added the enhancement New feature or request label Jul 10, 2024
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

Successfully merging a pull request may close this issue.

2 participants