Skip to content

Commit

Permalink
[docs] automatically build the list of bridges (#2473)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Apr 10, 2024
1 parent 362544d commit 4b19d2d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 95 deletions.
1 change: 0 additions & 1 deletion docs/src/developer/checklists.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ The steps are mostly the same, but locations depend on whether the bridge is a
## Documentation
- [ ] Add a docstring which uses the same template as existing bridges.
- [ ] Add the docstring to `docs/src/submodules/Bridges/list_of_bridges.md`
## Final touch
Expand Down
102 changes: 18 additions & 84 deletions docs/src/submodules/Bridges/list_of_bridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,100 +15,34 @@ implemented in MathOptInterface.

These bridges are subtypes of [`Bridges.Constraint.AbstractBridge`](@ref).

```@docs
Bridges.Constraint.GreaterToIntervalBridge
Bridges.Constraint.LessToIntervalBridge
Bridges.Constraint.GreaterToLessBridge
Bridges.Constraint.LessToGreaterBridge
Bridges.Constraint.NonnegToNonposBridge
Bridges.Constraint.NonposToNonnegBridge
Bridges.Constraint.VectorizeBridge
Bridges.Constraint.ScalarizeBridge
Bridges.Constraint.ScalarSlackBridge
Bridges.Constraint.VectorSlackBridge
Bridges.Constraint.ScalarFunctionizeBridge
Bridges.Constraint.VectorFunctionizeBridge
Bridges.Constraint.ToScalarQuadraticBridge
Bridges.Constraint.ToVectorQuadraticBridge
Bridges.Constraint.ToScalarNonlinearBridge
Bridges.Constraint.FunctionConversionBridge
Bridges.Constraint.SplitComplexEqualToBridge
Bridges.Constraint.SplitComplexZerosBridge
Bridges.Constraint.SplitHyperRectangleBridge
Bridges.Constraint.SplitIntervalBridge
Bridges.Constraint.SOCtoRSOCBridge
Bridges.Constraint.RSOCtoSOCBridge
Bridges.Constraint.SOCtoNonConvexQuadBridge
Bridges.Constraint.RSOCtoNonConvexQuadBridge
Bridges.Constraint.QuadtoSOCBridge
Bridges.Constraint.SOCtoPSDBridge
Bridges.Constraint.RSOCtoPSDBridge
Bridges.Constraint.NormInfinityBridge
Bridges.Constraint.NormOneBridge
Bridges.Constraint.NormToPowerBridge
Bridges.Constraint.NormOneConeToNormConeBridge
Bridges.Constraint.SecondOrderConeToNormConeBridge
Bridges.Constraint.NormInfinityConeToNormConeBridge
Bridges.Constraint.GeoMeantoRelEntrBridge
Bridges.Constraint.GeoMeanToPowerBridge
Bridges.Constraint.GeoMeanBridge
Bridges.Constraint.RelativeEntropyBridge
Bridges.Constraint.NormSpectralBridge
Bridges.Constraint.NormNuclearBridge
Bridges.Constraint.SquareBridge
Bridges.Constraint.HermitianToSymmetricPSDBridge
Bridges.Constraint.SetDotScalingBridge
Bridges.Constraint.SetDotInverseScalingBridge
Bridges.Constraint.RootDetBridge
Bridges.Constraint.LogDetBridge
Bridges.Constraint.IndicatorActiveOnFalseBridge
Bridges.Constraint.IndicatorGreaterToLessThanBridge
Bridges.Constraint.IndicatorLessToGreaterThanBridge
Bridges.Constraint.IndicatorSOS1Bridge
Bridges.Constraint.SemiToBinaryBridge
Bridges.Constraint.ZeroOneBridge
Bridges.Constraint.IntegerToZeroOneBridge
Bridges.Constraint.NumberConversionBridge
Bridges.Constraint.AllDifferentToCountDistinctBridge
Bridges.Constraint.ReifiedAllDifferentToCountDistinctBridge
Bridges.Constraint.BinPackingToMILPBridge
Bridges.Constraint.CircuitToMILPBridge
Bridges.Constraint.CountAtLeastToCountBelongsBridge
Bridges.Constraint.CountBelongsToMILPBridge
Bridges.Constraint.CountDistinctToMILPBridge
Bridges.Constraint.ReifiedCountDistinctToMILPBridge
Bridges.Constraint.CountGreaterThanToMILPBridge
Bridges.Constraint.TableToMILPBridge
Bridges.Constraint.SOS1ToMILPBridge
Bridges.Constraint.SOS2ToMILPBridge
Bridges.Constraint.IndicatorToMILPBridge
```@autodocs
Modules = [Bridges.Constraint]
Filter = t -> begin
M = MathOptInterface.Bridges.Constraint
return t isa Type && t != M.AbstractBridge && t <: M.AbstractBridge
end
```

## [Objective bridges](@id objective_bridges_ref)

These bridges are subtypes of [`Bridges.Objective.AbstractBridge`](@ref).

```@docs
Bridges.Objective.FunctionizeBridge
Bridges.Objective.QuadratizeBridge
Bridges.Objective.VectorFunctionizeBridge
Bridges.Objective.FunctionConversionBridge
Bridges.Objective.SlackBridge
Bridges.Objective.VectorSlackBridge
```@autodocs
Modules = [Bridges.Objective]
Filter = t -> begin
M = MathOptInterface.Bridges.Objective
return t isa Type && t != M.AbstractBridge && t <: M.AbstractBridge
end
```

## [Variable bridges](@id variable_bridges_ref)

These bridges are subtypes of [`Bridges.Variable.AbstractBridge`](@ref).

```@docs
Bridges.Variable.FreeBridge
Bridges.Variable.NonposToNonnegBridge
Bridges.Variable.RSOCtoPSDBridge
Bridges.Variable.RSOCtoSOCBridge
Bridges.Variable.SOCtoRSOCBridge
Bridges.Variable.VectorizeBridge
Bridges.Variable.ZerosBridge
Bridges.Variable.HermitianToSymmetricPSDBridge
Bridges.Variable.ParameterToEqualToBridge
```@autodocs
Modules = [Bridges.Variable]
Filter = t -> begin
M = MathOptInterface.Bridges.Variable
return t isa Type && t != M.AbstractBridge && t <: M.AbstractBridge
end
```
13 changes: 3 additions & 10 deletions docs/src/submodules/Bridges/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,42 +28,35 @@ Bridges.runtests

```@docs
Bridges.Constraint.AbstractBridge
Bridges.Constraint.SingleBridgeOptimizer
supports_constraint(::Type{<:Bridges.Constraint.AbstractBridge}, ::Type{<:AbstractFunction}, ::Type{<:AbstractSet})
Bridges.Constraint.concrete_bridge_type
Bridges.Constraint.bridge_constraint
Bridges.Constraint.AbstractFunctionConversionBridge
Bridges.Constraint.SingleBridgeOptimizer
Bridges.Constraint.add_all_bridges
Bridges.Constraint.FlipSignBridge
Bridges.Constraint.AbstractToIntervalBridge
Bridges.Constraint.MultiSetMapBridge
Bridges.Constraint.SetMapBridge
Bridges.Constraint.conversion_cost
```

## Objective bridge API

```@docs
Bridges.Objective.AbstractBridge
Bridges.Objective.SingleBridgeOptimizer
Bridges.Objective.supports_objective_function
Bridges.set_objective_function_type
Bridges.Objective.concrete_bridge_type
Bridges.Objective.bridge_objective
Bridges.Objective.SingleBridgeOptimizer
Bridges.Objective.add_all_bridges
```

## [Variable bridge API](@id ref_variable_bridges)

```@docs
Bridges.Variable.AbstractBridge
Bridges.Variable.SingleBridgeOptimizer
Bridges.Variable.supports_constrained_variable
Bridges.Variable.concrete_bridge_type
Bridges.Variable.bridge_constrained_variable
Bridges.Variable.SingleBridgeOptimizer
Bridges.Variable.add_all_bridges
Bridges.Variable.FlipSignBridge
Bridges.Variable.SetMapBridge
Bridges.Variable.unbridged_map
```

Expand Down

0 comments on commit 4b19d2d

Please sign in to comment.