Conversation
odow
reviewed
May 28, 2024
odow
reviewed
May 28, 2024
odow
reviewed
May 28, 2024
odow
reviewed
Jun 12, 2024
odow
reviewed
Jun 12, 2024
Member
Author
|
For
|
odow
reviewed
Jun 21, 2024
src/Bridges/set_map.jl
Outdated
| The default implementation of [`Variable.bridge_constraint`](@ref) uses | ||
| [`map_set`](@ref) with the bridge type so if this function is defined | ||
| on the bridge type, [`Variable.bridge_constraint`](@ref) does not need | ||
| to be implemented. |
Member
There was a problem hiding this comment.
I don't understand this comment. Variable.bridge_constraint does not exist.
Member
There was a problem hiding this comment.
Do you mean
MathOptInterface.jl/src/Bridges/Constraint/set_map.jl
Lines 37 to 45 in 193aec6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I decided that these functions would only depend on the type, it was for consistency for
map_functionbecausemap_functionclearly cannot depend on anything else given that it is used inbridge_constraint. However, you could also have a bridge that implements its ownbridge_constraint, storing extra information then in the bridge to be able to implementinverse_map_function, etc... This is the case of the Sum-of-Squares bridge.Needed for jump-dev/SumOfSquares.jl#355