Closed blegat closed 1 month ago
For map_function
, there are two cases:
bridge_constraint
and map_function(::AbstractBridge, ...)
in which case in case the map depends on values stored in the bridge. map_function
is used for setting the ConstraintPrimalStart
so actually is not a huge priority to implement itmap_function(::Type, ...)
in which case the default fallback for bridge_constraint
is enough.
Since the second cases is useful as well, we shouldn't say map_function(::Type, ...)
is legacy even if for the other ones I wrote in the docstring that they were legacy :thinking:
When I decided that these functions would only depend on the type, it was for consistency for
map_function
becausemap_function
clearly 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 https://github.com/jump-dev/SumOfSquares.jl/pull/355