Skip to content

Commit 9089262

Browse files
authored
Merge pull request #1 from JuliaGraphs/migrate-to-graphs.jl
2 parents 40cdca3 + 7c59235 commit 9089262

31 files changed

+250
-259
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The LightGraphsFlows.jl package is licensed under the Simplified "2-clause" BSD License:
1+
The GraphsFlows.jl package is licensed under the Simplified "2-clause" BSD License:
22

33
> Copyright (c) 2018: mbesancon.
44
> All rights reserved.

Project.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name = "LightGraphsFlows"
2-
uuid = "2f5eb75a-258c-59e0-affc-f41c55f75335"
1+
name = "GraphsFlows"
2+
uuid = "06909019-6f44-4949-96fc-b9d9aaa02889"
33
authors = ["Mathieu Besançon <mathieu.besancon@gmail.com>"]
4-
version = "0.4.2"
4+
version = "0.1.0"
55

66
[deps]
7+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
78
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
8-
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
99
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1010
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
1111
SimpleTraits = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
1212
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1313

1414
[compat]
1515
JuMP = "0.21"
16-
LightGraphs = "1.3"
16+
Graphs = "1.4"
1717
SimpleTraits = "0.9"
1818
julia = "1.3"
1919

README.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
# LightGraphsFlows
1+
# GraphsFlows
22

3-
[![CI](https://github.com/JuliaGraphs/LightGraphsFlows.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaGraphs/LightGraphsFlows.jl/actions/workflows/ci.yml)
4-
[![codecov.io](http://codecov.io/github/JuliaGraphs/LightGraphsFlows.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGraphs/LightGraphsFlows.jl?branch=master)
5-
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliagraphs.github.io/LightGraphsFlows.jl/stable/)
3+
[![CI](https://github.com/JuliaGraphs/GraphsFlows.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaGraphs/GraphsFlows.jl/actions/workflows/ci.yml)
4+
[![codecov.io](http://codecov.io/github/JuliaGraphs/GraphsFlows.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGraphs/GraphsFlows.jl?branch=master)
5+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliagraphs.github.io/GraphsFlows.jl/stable/)
66

7-
Flow algorithms on top of [LightGraphs.jl](https://github.com/JuliaGraphs/LightGraphs.jl),
7+
Flow algorithms on top of [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl),
88
including `maximum_flow`, `multiroute_flow` and `mincost_flow`.
99
See [Maximum flow problem](https://en.wikipedia.org/wiki/Maximum_flow_problem)
1010
for a detailed description of the problem.
1111

12-
Documentation for this package is available [here](https://juliagraphs.github.io/LightGraphsFlows.jl/latest/). For an overview of JuliaGraphs, see [this page](https://juliagraphs.github.io/).
12+
Documentation for this package is available [here](https://juliagraphs.github.io/GraphsFlows.jl/latest/). For an overview of JuliaGraphs, see [this page](https://juliagraphs.github.io/).
1313

1414
## Usage
1515

1616
### Maxflow
1717

1818
```julia
19-
julia> using LightGraphs, LightGraphsFlows
20-
julia> const LG = LightGraphs
21-
julia> flow_graph = LG.DiGraph(8) # Create a flow graph
19+
julia> using Graphs, GraphsFlows
20+
julia> flow_graph = Graphs.DiGraph(8) # Create a flow graph
2221
julia> flow_edges = [
2322
(1,2,10),(1,3,5),(1,4,15),(2,3,4),(2,5,9),
2423
(2,6,15),(3,4,4),(3,6,8),(4,7,16),(5,6,15),
@@ -29,7 +28,7 @@ julia> capacity_matrix = zeros(Int, 8, 8) # Create a capacity matrix
2928

3029
julia> for e in flow_edges
3130
u, v, f = e
32-
LG.add_edge!(flow_graph, u, v)
31+
Graphs.add_edge!(flow_graph, u, v)
3332
capacity_matrix[u,v] = f
3433
end
3534

@@ -47,10 +46,9 @@ julia> f, F, labels = maximum_flow(flow_graph, 1, 8, capacity_matrix, algorithm=
4746
### Multi-route flow
4847

4948
```julia
50-
julia> using LightGraphs, LightGraphsFlows
51-
julia> const LG = LightGraphs
49+
julia> using Graphs, GraphsFlows
5250

53-
julia> flow_graph = LG.DiGraph(8) # Create a flow graph
51+
julia> flow_graph = Graphs.DiGraph(8) # Create a flow graph
5452

5553
julia> flow_edges = [
5654
(1, 2, 10), (1, 3, 5), (1, 4, 15), (2, 3, 4), (2, 5, 9),
@@ -62,7 +60,7 @@ julia> capacity_matrix = zeros(Int, 8, 8) # Create a capacity matrix
6260

6361
julia> for e in flow_edges
6462
u, v, f = e
65-
LG.add_edge!(flow_graph, u, v)
63+
Graphs.add_edge!(flow_graph, u, v)
6664
capacity_matrix[u, v] = f
6765
end
6866

@@ -86,18 +84,17 @@ defined by [MathOptInterface.jl](https://www.juliaopt.org/MathOptInterface.jl/st
8684
julia> using SparseArrays: spzeros
8785
julia> import Clp
8886

89-
julia> using LightGraphs, LightGraphsFlows
90-
julia> const LG = LightGraphs
91-
92-
julia> g = LG.DiGraph(6)
93-
julia> LG.add_edge!(g, 5, 1)
94-
julia> LG.add_edge!(g, 5, 2)
95-
julia> LG.add_edge!(g, 3, 6)
96-
julia> LG.add_edge!(g, 4, 6)
97-
julia> LG.add_edge!(g, 1, 3)
98-
julia> LG.add_edge!(g, 1, 4)
99-
julia> LG.add_edge!(g, 2, 3)
100-
julia> LG.add_edge!(g, 2, 4)
87+
julia> using Graphs, GraphsFlows
88+
89+
julia> g = Graphs.DiGraph(6)
90+
julia> Graphs.add_edge!(g, 5, 1)
91+
julia> Graphs.add_edge!(g, 5, 2)
92+
julia> Graphs.add_edge!(g, 3, 6)
93+
julia> Graphs.add_edge!(g, 4, 6)
94+
julia> Graphs.add_edge!(g, 1, 3)
95+
julia> Graphs.add_edge!(g, 1, 4)
96+
julia> Graphs.add_edge!(g, 2, 3)
97+
julia> Graphs.add_edge!(g, 2, 4)
10198
julia> cost = zeros(6,6)
10299
julia> cost[1,3] = 10.
103100
julia> cost[1,4] = 5.

docs/Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3-
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
4-
LightGraphsFlows = "2f5eb75a-258c-59e0-affc-f41c55f75335"
3+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
4+
GraphsFlows = "06909019-6f44-4949-96fc-b9d9aaa02889"
5+

docs/make.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
using Documenter
2-
using LightGraphsFlows
3-
using LightGraphs
4-
const lg = LightGraphs
2+
using GraphsFlows
3+
using Graphs
54

65
makedocs(
7-
modules = [LightGraphsFlows],
6+
modules = [GraphsFlows],
87
format = Documenter.HTML(),
9-
sitename = "LightGraphsFlows",
8+
sitename = "GraphsFlows",
109
pages = Any[
1110
"Getting started" => "index.md",
1211
"Maxflow algorithms" => "maxflow.md",
@@ -19,6 +18,6 @@ makedocs(
1918
deploydocs(
2019
deps = nothing,
2120
make = nothing,
22-
repo = "github.com/JuliaGraphs/LightGraphsFlows.jl.git",
21+
repo = "github.com/JuliaGraphs/GraphsFlows.jl.git",
2322
versions = ["stable" => "v^", "v#.#", "dev" => "master"],
2423
)

docs/mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
site_name: LightGraphsFlows.jl
2-
repo_url: https://github.com/JuliaGraphs/LightGraphsFlows.jl
3-
site_description: Documentation for LightGraphsFlows, the JuliaGraphs package for flow and cut problems
1+
site_name: GraphsFlows.jl
2+
repo_url: https://github.com/JuliaGraphs/GraphsFlows.jl
3+
site_description: Documentation for GraphsFlows, the JuliaGraphs package for flow and cut problems
44
site_author: JuliaGraphs
55

66
theme: material

docs/src/index.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
# LightGraphsFlows.jl: flow algorithms for LightGraphs
1+
# GraphsFlows.jl: flow algorithms for Graphs.jl
22

33
```@meta
4-
CurrentModule = LightGraphsFlows
4+
CurrentModule = GraphsFlows
55
DocTestSetup = quote
6-
using LightGraphsFlows
7-
import LightGraphs
8-
const lg = LightGraphs
6+
using GraphsFlows
7+
import Graphs
98
end
109
```
1110

1211
```@autodocs
13-
Modules = [LightGraphsFlows]
14-
Pages = ["LightGraphsFlows.jl"]
12+
Modules = [GraphsFlows]
13+
Pages = ["GraphsFlows.jl"]
1514
Order = [:function, :type]
1615
```
1716

18-
This is the documentation page for `LightGraphsFlows`. In all pages, we assume
19-
LightGraphsFlows has been imported into scope and that LightGraphs is
20-
available with the alias `lg`:
17+
This is the documentation page for `GraphsFlows`. In all pages, we assume
18+
GraphsFlows has been imported into scope and that Graphs.jl has been imported.
2119

2220
```julia
23-
using LightGraphsFlows
24-
import LightGraphs
25-
const lg = LightGraphs
21+
using GraphsFlows
22+
import Graphs
2623
```

docs/src/maxflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Max flow algorithms
22

33
```@autodocs
4-
Modules = [LightGraphsFlows]
4+
Modules = [GraphsFlows]
55
Pages = ["maxflow.jl", "boykov_kolmogorov.jl", "push_relabel.jl", "dinic.jl", "edmonds_karp.jl"]
66
Order = [:function, :type]
77
```

docs/src/mincost.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Min-cost flow
22

33
```@autodocs
4-
Modules = [LightGraphsFlows]
4+
Modules = [GraphsFlows]
55
Pages = ["mincost.jl"]
66
Order = [:function, :type]
77
```

docs/src/mincut.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Min-cut
22

33
```@autodocs
4-
Modules = [LightGraphsFlows]
4+
Modules = [GraphsFlows]
55
Pages = ["mincut.jl"]
66
Order = [:function, :type]
77
```

0 commit comments

Comments
 (0)