Skip to content

Conversation

@FlorianPommerening
Copy link
Member

State now returns an int value when indexed with an int variable. Indexing a state with a VariableProxy still returns a FactProxy as before. Iterating over a state with a range-based for loop is also still possible and loops over FactProxy elements as well.

@ClemensBuechner ClemensBuechner mentioned this pull request May 7, 2025
Copy link
Contributor

@ClemensBuechner ClemensBuechner left a comment

Choose a reason for hiding this comment

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

The change cleans up many parts of the code, so I like it. In most contexts, we use var_id in the calls state[var_id], which is good I think. There are some exceptions where it currently says state[var] whic I find not as clear. There's also places where var_no is used rather than var_id. Should we change these to be more consistent? But I think it's fine to merge even without doing so.

Copy link
Contributor

@ClemensBuechner ClemensBuechner left a comment

Choose a reason for hiding this comment

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

Still looks good to me.

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.

2 participants