44# Use of this source code is governed by an MIT-style license that can be found
55# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
66
7+ """
8+ struct MapNotInvertible <: Exception end
9+
10+ An error thrown by [`inverse_map_function`](@ref) or
11+ [`inverse_adjoint_map_function`](@ref) indicating that the linear map `A`
12+ defined in [`Variable.SetMapBridge`](@ref) and [`Constraint.SetMapBridge`](@ref)
13+ is not invertible.
14+ """
715struct MapNotInvertible <: Exception end
816
917"""
@@ -55,7 +63,7 @@ function map_function(::Type{BT}, func, i::IndexInVector) where {BT}
5563end
5664
5765"""
58- inverse_map_function(::Type{BT} , func) where {BT}
66+ inverse_map_function(bridge::MOI.Bridges.AbstractBridge , func)
5967
6068Return the image of `func` through the inverse of the linear map `A` defined in
6169[`Variable.SetMapBridge`](@ref) and [`Constraint.SetMapBridge`](@ref). This is
@@ -64,6 +72,13 @@ used by [`Variable.unbridged_map`](@ref) and for setting the
6472and for getting the [`MOI.ConstraintFunction`](@ref),
6573the [`MOI.ConstraintPrimal`](@ref) and the
6674[`MOI.ConstraintPrimalStart`](@ref) of constraint bridges.
75+ If the linear map `A` is not invertible, the error [`MapNotInvertible`](@ref) is
76+ thrown.
77+
78+ inverse_map_function(::Type{BT}, func) where {BT}
79+
80+ The method can alternatively be defined on the bridge type. This legacy
81+ interface is kept for backward compatibility.
6782"""
6883function inverse_map_function end
6984
@@ -72,12 +87,17 @@ function inverse_map_function(bridge::AbstractBridge, func)
7287end
7388
7489"""
75- adjoint_map_function(::Type{BT} , func) where {BT}
90+ adjoint_map_function(bridge::MOI.Bridges.AbstractBridge , func)
7691
7792Return the image of `func` through the adjoint of the linear map `A` defined in
7893[`Variable.SetMapBridge`](@ref) and [`Constraint.SetMapBridge`](@ref). This is
7994used for getting the [`MOI.ConstraintDual`](@ref) and
8095[`MOI.ConstraintDualStart`](@ref) of constraint bridges.
96+
97+ adjoint_map_function(::Type{BT}, func) where {BT}
98+
99+ The method can alternatively be defined on the bridge type. This legacy
100+ interface is kept for backward compatibility.
81101"""
82102function adjoint_map_function end
83103
@@ -86,13 +106,20 @@ function adjoint_map_function(bridge::AbstractBridge, func)
86106end
87107
88108"""
89- inverse_adjoint_map_function(::Type{BT} , func) where {BT}
109+ inverse_adjoint_map_function(bridge::MOI.Bridges.AbstractBridge , func)
90110
91111Return the image of `func` through the inverse of the adjoint of the linear map
92112`A` defined in [`Variable.SetMapBridge`](@ref) and
93113[`Constraint.SetMapBridge`](@ref). This is used for getting the
94114[`MOI.ConstraintDual`](@ref) of variable bridges and setting the
95115[`MOI.ConstraintDualStart`](@ref) of constraint bridges.
116+ If the linear map `A` is not invertible, the error [`MapNotInvertible`](@ref) is
117+ thrown.
118+
119+ inverse_adjoint_map_function(::Type{BT}, func) where {BT}
120+
121+ The method can alternatively be defined on the bridge type. This legacy
122+ interface is kept for backward compatibility.
96123"""
97124function inverse_adjoint_map_function end
98125
0 commit comments