From ed11d1d2b4a2897ed06e379670654934cfca1266 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Fri, 21 Jun 2024 10:42:49 +1200 Subject: [PATCH] Update set_map.jl --- src/Bridges/set_map.jl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Bridges/set_map.jl b/src/Bridges/set_map.jl index d905c3b57a..3eed5303cc 100644 --- a/src/Bridges/set_map.jl +++ b/src/Bridges/set_map.jl @@ -29,13 +29,21 @@ the [`MOI.ConstraintSet`](@ref). function map_set end """ + inverse_map_set(bridge::MOI.Bridges.AbstractBridge, set) inverse_map_set(::Type{BT}, set) where {BT} Return the preimage of `set` through the linear map `A` defined in -[`Variable.SetMapBridge`](@ref) and [`Constraint.SetMapBridge`](@ref). This is -used for getting the [`MOI.ConstraintSet`](@ref). +[`Variable.SetMapBridge`](@ref) and [`Constraint.SetMapBridge`](@ref). + +This function is used for getting the [`MOI.ConstraintSet`](@ref). + +The method can alternatively be defined on the bridge type. This legacy +interface is kept for backward compatibility. """ -function inverse_map_set end +function inverse_map_set(bridge::AbstractBridge, set) + return map_function(typeof(bridge), set) +end + """ map_function(bridge::MOI.Bridges.AbstractBridge, func)