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

expression_weighted.get_weight() and expression_weighted.set_weight() now use the correct input_id #59

Merged
merged 3 commits into from
Apr 7, 2020

Conversation

hejung
Copy link
Contributor

@hejung hejung commented Jan 29, 2020

fixes #56 .
I added test for expression_weighted for all four methods that get/set weights (both single weights and the whole vector).

@hejung
Copy link
Contributor Author

hejung commented Feb 10, 2020

To avoid implicit downcasts in the get/set_weight function I changed the types for node_id and input_id to unsigned (instead of size_type). The CI OSX debug build should now pass.

I think the changes are in line with the rest of the code where unsigned is used for node_id consistently, but please let me know if there is something to improve.

@darioizzo
Copy link
Owner

Thanks for this PR. I am now working on the pybind11, will merge after that is concluded!

@darioizzo darioizzo merged commit 6acf3c3 into darioizzo:master Apr 7, 2020
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.

expression.set_weight() for weighted expressions does not respect the input_id
2 participants