Skip to content

Commit 2d8c8b2

Browse files
committed
improved line_graph and inserted changes into the latest main commit
1 parent d2fdc73 commit 2d8c8b2

91 files changed

Lines changed: 3748 additions & 1018 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.git-blame-ignore-revs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# .git-blame-ignore-revs
2+
# Initial converion to uniform formatting
3+
ea6bcfeb71de9d1229bbd411ef9b10cac44fa795
4+
# Formatter v1 improvements
5+
5878e7be4d68b2a1c179d1367aea670db115ebb5
6+
# updating to Formatter v2
7+
f4b70cd8bbbcd43bf127bbe2acf3f7a11aef7942

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ docs/build/
66
docs/site/
77
benchmark/.results/*
88
benchmark/.tune.jld
9-
benchmark/Manifest.toml
109
.benchmarkci
1110
*.cov
12-
/Manifest.toml
13-
/docs/Manifest.toml
11+
Manifest.toml
1412
/docs/src/index.md
1513
/docs/src/contributing.md
1614
/docs/src/license.md
17-
.aider*

.pre-commit-config.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# News
2+
3+
We follow SemVer as most of the Julia ecosystem. Below you might see the "breaking" label even for minor version bumps -- we use it a bit more loosely to denote things that are not breaking by SemVer's definition but might cause breakage to people using internal or experimental APIs or undocumented implementation details.
4+
5+
## unreleased
6+
- `is_articulation(g, v)` for checking whether a single vertex is an articulation point
7+
8+
9+
## v1.14.0 - 2026-02-26
10+
- **(breaking)** `neighbors`, `inneighbors`, and `outneighbors` now return an immutable `FrozenVector` instead of `Vector`
11+
- Louvain community detection algorithm
12+
- Graph views: `ReverseView` and `UndirectedView` for directed graphs
13+
- New graph products: `strong_product`, `disjunctive_product`, `lexicographic_product`, `homomorphic_product`
14+
- `maximum_clique`, `clique_number`, `maximal_independent_sets`, `maximum_independent_set`, `independence_number`
15+
- `regular_tree` generator
16+
- `kruskal_mst` now accepts weight vectors
17+
- `is_planar` planarity test and `planar_maximally_filtered_graph` (PMFG) algorithm
18+
- `count_connected_components` for efficiently counting connected components without materializing them
19+
- `connected_components!` is now exported and accepts an optional `search_queue` argument to reduce allocations
20+
- `is_connected` optimized to avoid allocating component vectors
21+
22+
## v1.13.0 - 2025-06-05
23+
- **(breaking)** Julia v1.10 (LTS) minimum version requirement
24+
- Non-allocating `enumerate_paths!`
25+
26+
## v1.12.0 - 2024-09-29
27+
- New options for `BFSIterator`
28+
29+
## v1.11.0 - 2024-05-05
30+
- DFS and BFS iterators
31+
- Dorogovtsev-Mendes graph generator optimization
32+
33+
## v1.10.0 - 2024-04-05
34+
- Longest path algorithm for DAGs
35+
- All simple paths algorithm
36+
37+
## v1.9.0 - 2023-09-28
38+
- Rewrite of `edit_distance` with edge costs
39+
- Eulerian cycles/trails for undirected graphs
40+
- `mincut` implementation
41+
- `strongly_connected_components_tarjan`
42+
43+
## v1.8.0 - 2023-02-10
44+
- `newman_watts_strogatz` graph generator
45+
- Prufer coding for trees
46+
- `isdigraphical`
47+
48+
## v1.7.0 - 2022-06-19
49+
- Hierarchical documentation structure
50+
51+
## v1.6.0 - 2022-02-09
52+
- **(breaking)** Requires Julia >= v1.6
53+
- **(breaking)** `Base.zero` no longer mandatory for `AbstractGraph`
54+
- Simplified `AbstractGraph` interface
55+
56+
## v1.5.0 - 2022-01-09
57+
- **(breaking)** `merge_vertices` now only works on subtypes of `AbstractSimpleGraph`
58+
- `rich_club` function
59+
- `induced_subgraph` with boolean indexing
60+
- Optional start vertex for `maximum_adjacency_search`
61+
62+
## v1.4.0 - 2021-10-17
63+
- Initial release as Graphs.jl (successor to LightGraphs.jl)
64+
65+
The _Graphs.jl_ project is a reboot of the _LightGraphs.jl_ package (archived in October 2021), which remains available on GitHub at [sbromberger/LightGraphs.jl](https://github.com/sbromberger/LightGraphs.jl). If you don't need any new features developed since the fork, you can continue to use older versions of _LightGraphs.jl_ indefinitely. New versions will be released here using the name _Graphs.jl_ instead of _LightGraphs.jl_. There was an older package also called _Graphs.jl_. The source history and versions are still available in this repository, but the current code base is unrelated to the old _Graphs.jl_ code and is derived purely from _LightGraphs.jl_. To access the history of the old _Graphs.jl_ code, you can start from [commit 9a25019](https://github.com/JuliaGraphs/Graphs.jl/commit/9a2501948053f60c630caf9d4fb257e689629041).
66+
67+
### Transition from LightGraphs to Graphs
68+
69+
_LightGraphs.jl_ and _Graphs.jl_ are functionally identical, still there are some steps involved making the change:
70+
71+
- Change `LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"` to `Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"` in your Project.toml.
72+
- Update your `using` and `import` statements.
73+
- Update your type constraints and other references to `LightGraphs` to `Graphs`.
74+
- Increment your version number. Following semantic versioning, we suggest a patch release when no graphs or other `Graphs.jl`-objects can be passed through the API of your package by those depending on it, otherwise consider it a breaking release. "Passed through" entails created outside and consumed inside your package and vice versa.
75+
- Tag a release.
76+
77+
### About versions
78+
79+
- The master branch of _Graphs.jl_ is generally designed to work with versions of Julia starting from the [LTS release](https://julialang.org/downloads/#long_term_support_release) all the way to the [current stable release](https://julialang.org/downloads/#current_stable_release), except during Julia version increments as we transition to the new version.
80+
- Later versions: Some functionality might not work with prerelease / unstable / nightly versions of Julia. If you run into a problem, please file an issue.
81+
- The project was previously developed under the name _LightGraphs.jl_ and older versions of _LightGraphs.jl_ (≤ v1.3.5) must still be used with that name.
82+
- There was also an older package also called _Graphs.jl_ (git tags `v0.2.5` through `v0.10.3`), but the current code base here is a fork of _LightGraphs.jl_ v1.3.5.
83+
- All older _LightGraphs.jl_ versions are tagged using the naming scheme `lg-vX.Y.Z` rather than plain `vX.Y.Z`, which is used for old _Graphs.jl_ versions (≤ v0.10) and newer versions derived from _LightGraphs.jl_ but released with the _Graphs.jl_ name (≥ v1.4).
84+
- If you are using a version of Julia prior to 1.x, then you should use _LightGraphs.jl_ at `lg-v.12.*` or _Graphs.jl_ at `v0.10.3`

Project.toml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,33 @@
11
name = "Graphs"
22
uuid = "86223c79-3864-5bf0-83f7-82e725a168b6"
3-
version = "1.13.0"
3+
version = "1.14.0"
44

55
[deps]
66
ArnoldiMethod = "ec485272-7323-5ecc-a04f-4719b315124d"
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
8-
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
98
Inflate = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
109
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1110
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
12-
SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
1311
SimpleTraits = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
1412
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1513
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1614

15+
[weakdeps]
16+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
17+
SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
18+
19+
[extensions]
20+
GraphsSharedArraysExt = "SharedArrays"
21+
1722
[compat]
18-
Aqua = "0.6"
1923
ArnoldiMethod = "0.4"
20-
DataStructures = "0.17, 0.18"
21-
Documenter = "0.27"
24+
DataStructures = "0.19"
25+
Distributed = "1"
2226
Inflate = "0.1.3"
23-
JuliaFormatter = "1"
24-
SimpleTraits = "0.9"
25-
StableRNGs = "1"
27+
LinearAlgebra = "1"
28+
Random = "1"
29+
SharedArrays = "1"
30+
SimpleTraits = "0.9.1"
31+
SparseArrays = "1"
2632
Statistics = "1"
2733
julia = "1.10"
28-
29-
[extras]
30-
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
31-
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
32-
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
33-
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
34-
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
35-
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
36-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
37-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
38-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
39-
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
40-
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
41-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
42-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
43-
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
44-
45-
[targets]
46-
test = ["Aqua", "Base64", "DelimitedFiles", "Documenter", "JET", "JuliaFormatter", "LinearAlgebra", "Pkg", "Random", "SparseArrays", "StableRNGs", "Statistics", "Test", "Unitful"]

README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,6 @@ It is an explicit design decision that any data not required for graph manipulat
6868

6969
Additional functionality like advanced IO and file formats, weighted graphs, property graphs, and optimization-related functions can be found in the packages of the [JuliaGraphs organization](https://juliagraphs.org/).
7070

71-
## Project status
71+
## Project history
7272

73-
The _Graphs.jl_ project is a reboot of the _LightGraphs.jl_ package (archived in October 2021), which remains available on GitHub at [sbromberger/LightGraphs.jl](https://github.com/sbromberger/LightGraphs.jl). If you don't need any new features developed since the fork, you can continue to use older versions of _LightGraphs.jl_ indefinitely. New versions will be released here using the name _Graphs.jl_ instead of _LightGraphs.jl_. There was an older package also called _Graphs.jl_. The source history and versions are still available in this repository, but the current code base is unrelated to the old _Graphs.jl_ code and is derived purely from _LightGraphs.jl_. To access the history of the old _Graphs.jl_ code, you can start from [commit 9a25019](https://github.com/JuliaGraphs/Graphs.jl/commit/9a2501948053f60c630caf9d4fb257e689629041).
74-
75-
### Transition from LightGraphs to Graphs
76-
77-
_LightGraphs.jl_ and _Graphs.jl_ are functionally identical, still there are some steps involved making the change:
78-
79-
- Change `LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"` to `Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"` in your Project.toml.
80-
- Update your `using` and `import` statements.
81-
- Update your type constraints and other references to `LightGraphs` to `Graphs`.
82-
- Increment your version number. Following semantic versioning, we suggest a patch release when no graphs or other `Graphs.jl`-objects can be passed through the API of your package by those depending on it, otherwise consider it a breaking release. "Passed through" entails created outside and consumed inside your package and vice versa.
83-
- Tag a release.
84-
85-
### About versions
86-
87-
- The master branch of _Graphs.jl_ is generally designed to work with versions of Julia starting from the [LTS release](https://julialang.org/downloads/#long_term_support_release) all the way to the [current stable release](https://julialang.org/downloads/#current_stable_release), except during Julia version increments as we transition to the new version.
88-
- Later versions: Some functionality might not work with prerelease / unstable / nightly versions of Julia. If you run into a problem, please file an issue.
89-
- The project was previously developed under the name _LightGraphs.jl_ and older versions of _LightGraphs.jl_ (≤ v1.3.5) must still be used with that name.
90-
- There was also an older package also called _Graphs.jl_ (git tags `v0.2.5` through `v0.10.3`), but the current code base here is a fork of _LightGraphs.jl_ v1.3.5.
91-
- All older _LightGraphs.jl_ versions are tagged using the naming scheme `lg-vX.Y.Z` rather than plain `vX.Y.Z`, which is used for old _Graphs.jl_ versions (≤ v0.10) and newer versions derived from _LightGraphs.jl_ but released with the _Graphs.jl_ name (≥ v1.4).
92-
- If you are using a version of Julia prior to 1.x, then you should use _LightGraphs.jl_ at `lg-v.12.*` or _Graphs.jl_ at `v0.10.3`
73+
_Graphs.jl_ is the successor to _LightGraphs.jl_ (archived October 2021); see the [CHANGELOG](CHANGELOG.md) for the full transition history.

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
4+
IGraphs = "647e90d3-2106-487c-adb4-c91fc07b96ea"
5+
NautyGraphs = "7509a0a4-015a-4167-b44b-0799a1a2605e"
46

57
[compat]
68
Documenter = "1"

docs/make.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Documenter
22
using Graphs
3+
using IGraphs: IGraphs
4+
using NautyGraphs: NautyGraphs
35

46
# same for contributing and license
57
cp(
@@ -17,6 +19,11 @@ cp(
1719
normpath(@__FILE__, "../src/index.md");
1820
force=true,
1921
)
22+
cp(
23+
normpath(@__FILE__, "../../CHANGELOG.md"),
24+
normpath(@__FILE__, "../src/CHANGELOG.md");
25+
force=true,
26+
)
2027

2128
function get_title(markdown_file_path::AbstractString)
2229
first_line = open(markdown_file_path) do io
@@ -35,7 +42,11 @@ pages_files = [
3542
"first_steps/plotting.md",
3643
"first_steps/persistence.md",
3744
],
38-
"Ecosystem" => ["ecosystem/graphtypes.md", "ecosystem/interface.md"],
45+
"Ecosystem" => [
46+
"ecosystem/graphtypes.md",
47+
"ecosystem/graphalgorithms.md",
48+
"ecosystem/interface.md",
49+
],
3950
"Core API" => [
4051
"core_functions/core.md",
4152
"core_functions/interface.md",
@@ -44,6 +55,7 @@ pages_files = [
4455
"core_functions/persistence.md",
4556
"core_functions/simplegraphs_generators.md",
4657
"core_functions/simplegraphs.md",
58+
"core_functions/wrappedgraphs.md",
4759
],
4860
"Algorithms API" => [
4961
"algorithms/biconnectivity.md",
@@ -94,6 +106,7 @@ makedocs(;
94106
canonical="https://gdalle.github.io/Graphs.jl",
95107
),
96108
sitename="Graphs.jl",
109+
checkdocs=:public,
97110
doctest=false,
98111
expandfirst=[],
99112
pages=[
@@ -109,3 +122,4 @@ deploydocs(; repo="github.com/JuliaGraphs/Graphs.jl.git", target="build")
109122
rm(normpath(@__FILE__, "../src/contributing.md"))
110123
rm(normpath(@__FILE__, "../src/license.md"))
111124
rm(normpath(@__FILE__, "../src/index.md"))
125+
rm(normpath(@__FILE__, "../src/CHANGELOG.md"))

docs/src/algorithms/community.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Pages = [
1919
"community/clustering.jl",
2020
"community/core-periphery.jl",
2121
"community/label_propagation.jl",
22+
"community/louvain.jl",
2223
"community/modularity.jl",
2324
"community/rich_club.jl",
2425
]

docs/src/algorithms/spanningtrees.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Pages = [
1616
"spanningtrees/boruvka.jl",
1717
"spanningtrees/kruskal.jl",
1818
"spanningtrees/prim.jl",
19+
"planarity.jl",
20+
"spanningtrees/planar_maximally_filtered_graph.jl",
1921
]
2022
2123
```

0 commit comments

Comments
 (0)