Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.1.0"

[deps]
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
FrankWolfe = "f55ce6ea-fdc5-4628-88c5-0087fe54bd30"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
Expand All @@ -17,6 +18,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Aqua = "0.6"
Documenter = "0.27"
FillArrays = "0.13, 1.15"
FrankWolfe = "0.6.4"
Graphs = "1.7"
HiGHS = "1"
JuMP = "1"
Expand Down
6 changes: 6 additions & 0 deletions docs/src/algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,9 @@ GraphsOptim.is_permutation_matrix
GraphsOptim.flat_doubly_stochastic
GraphsOptim.indvec
```

## Path Graph Matching

```@docs
GraphsOptim.pathAlgorithm
```
5 changes: 4 additions & 1 deletion src/GraphsOptim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ using JuMP: objective_function, add_to_expression!
using JuMP: set_silent, optimize!, termination_status, value
using JuMP: set_optimizer, objective_value
using JuMP: @variable, @constraint, @objective
using LinearAlgebra: norm, tr, dot
using LinearAlgebra: norm, tr, dot, I
using MathOptInterface: OPTIMAL
using SparseArrays: sparse
using OptimalTransport: sinkhorn
using FrankWolfe

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import just the function you are using


export min_cost_flow
export min_cost_assignment
Expand All @@ -28,6 +29,7 @@ export maximum_weight_independent_set
export fractional_chromatic_number, fractional_clique_number
export shortest_path
export maximum_weight_clique
export pathAlgorithm

include("utils.jl")
include("flow.jl")
Expand All @@ -38,5 +40,6 @@ include("fractional_coloring.jl")
include("shortest_path.jl")
include("maximum_clique.jl")
include("independent_set.jl")
include("pathGraphMatching.jl")

end
2 changes: 1 addition & 1 deletion src/independent_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function maximum_weight_independent_set!(
model[Symbol(var_name)] = f
@constraint(
model,
covering_constraint[i=1:nv(g), j=1:nv(g); i ≠ j && has_edge(g, i, j)],
covering_constraint[i = 1:nv(g), j = 1:nv(g); i ≠ j && has_edge(g, i, j)],
f[i] + f[j] <= 1,
)
obj = objective_function(model)
Expand Down
2 changes: 1 addition & 1 deletion src/maximum_clique.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function maximum_weight_clique!(
model[Symbol(var_name)] = f
@constraint(
model,
packing_constraint[i=1:nv(g), j=1:nv(g); i ≠ j && !has_edge(g, i, j)],
packing_constraint[i = 1:nv(g), j = 1:nv(g); i ≠ j && !has_edge(g, i, j)],
f[i] + f[j] <= 1,
)
obj = objective_function(model)
Expand Down
Loading