Skip to content

Commit 896981a

Browse files
InterdisciplinaryPhysicsTeamClaudMorpitmonticone
committed
Clean README, docs and docstrings
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com> Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
1 parent 45750f1 commit 896981a

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,12 @@ Press `]` in the Julia REPL and then
2727
```julia
2828
pkg> add https://github.com/InPhyT/MultilayerGraphs.jl
2929
```
30-
[Registration](https://github.com/JuliaRegistries/General/pull/66311) is under way.
3130

3231
[Registration](https://github.com/JuliaRegistries/General/pull/66311) is in progress.
3332

3433
## Tutorial
3534

36-
In the package documentation we have written a [tutorial](https://inphyt.github.io/MultilayerGraphs.jl/stable/#Tutorial) to illustrate how to define, handle and analyse a [`MultilayerGraph`](@ref) (the directed version is completely analogous).
35+
In the package documentation we have prepared a [tutorial](https://inphyt.github.io/MultilayerGraphs.jl/stable/#Tutorial) to illustrate how to define, handle and analyse a [`MultilayerGraph`](@ref) (the directed version is completely analogous).
3736

3837
## Future Developments
3938

@@ -54,12 +53,14 @@ Here we highlight the major future developments we have currently identified:
5453

5554
## How to Contribute
5655

57-
If you wish to change or add some functionality, please file an [issue](https://github.com/InPhyT/MultilayerGraphs.jl/issues).
56+
The package is currently under development and further steps would benefit enormously from the precious feedback of the [JuliaGraph people](https://github.com/orgs/JuliaGraphs/people), graph theorists, network scientists and all the users who might have general questions or suggestions.
57+
58+
Therefore feel free to open [discussions](https://github.com/InPhyT/MultilayerGraphs.jl/discussions), [issues](https://github.com/InPhyT/MultilayerGraphs.jl/issues) or [PRs](https://github.com/InPhyT/MultilayerGraphs.jl/pulls). They are very welcome!
5859

5960
## How to Cite
6061

6162
If you use this package in your work, please cite this repository using the metadata in [`CITATION.bib`](https://github.com/InPhyT/MultilayerGraphs.jl/blob/main/CITATION.bib).
6263

6364
## References
6465

65-
De Domenico et al. (2013) [Mathematical Formulation of Multilayer Networks](https://doi.org/10.1103/PhysRevX.3.041022). *Physical Review X*
66+
De Domenico et al. (2013) [Mathematical Formulation of Multilayer Networks](https://doi.org/10.1103/PhysRevX.3.041022). *Physical Review X*.

docs/src/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Press `]` in the Julia REPL and then
3131
```julia
3232
pkg> add https://github.com/InPhyT/MultilayerGraphs.jl
3333
```
34+
3435
[Registration](https://github.com/JuliaRegistries/General/pull/66311) is in progress.
3536

3637
## Tutorial
@@ -520,12 +521,14 @@ Other extended functions are: [`is_directed`](@ref), [`has_vertex`](@ref), [`ne`
520521

521522
## How to Contribute
522523

523-
If you wish to change or add some functionality, please file an [issue](https://github.com/InPhyT/MultilayerGraphs.jl/issues).
524+
The package is currently under development and further steps would benefit enormously from the precious feedback of the [JuliaGraph people](https://github.com/orgs/JuliaGraphs/people), graph theorists, network scientists and all the users who might have general questions or suggestions.
525+
526+
Therefore feel free to open [discussions](https://github.com/InPhyT/MultilayerGraphs.jl/discussions), [issues](https://github.com/InPhyT/MultilayerGraphs.jl/issues) or [PRs](https://github.com/InPhyT/MultilayerGraphs.jl/pulls). They are very welcome!
524527

525528
## How to Cite
526529

527530
If you use this package in your work, please cite this repository using the metadata in [`CITATION.bib`](https://github.com/InPhyT/MultilayerGraphs.jl/blob/main/CITATION.bib).
528531

529532
## References
530533

531-
De Domenico et al. (2013) [Mathematical Formulation of Multilayer Networks](https://doi.org/10.1103/PhysRevX.3.041022). *Physical Review X*
534+
De Domenico et al. (2013) [Mathematical Formulation of Multilayer Networks](https://doi.org/10.1103/PhysRevX.3.041022). *Physical Review X*.

src/abstractmultilayergraph.jl

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,44 @@ Return the nodes of the AbstractMultilayerGraph `mg`.
375375
nodes(mg::M) where {M <: AbstractMultilayerGraph} = [vertex.node for vertex in vertices(mg.layers[(1,1)])]
376376

377377
# Graphs.jl's internals extra overrides
378+
"""
379+
indegree(mg::M, v::V) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}}
380+
381+
Get the indegree of vertex `v` in `mg`.
382+
"""
378383
Graphs.indegree(mg::M, v::V) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}} = length(inneighbors(mg, v))
384+
"""
385+
indegree(mg::M, vs::AbstractVector{V} = vertices(mg)) where {T,M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}}
386+
387+
Get the vector of indegrees of vertices `vs` in `mg`.
388+
"""
379389
Graphs.indegree(mg::M, vs::AbstractVector{V} = vertices(mg)) where {T,M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}} = [indegree(mg, x) for x in vs]
380390

391+
"""
392+
outdegree(mg::M, v::V) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}}
393+
394+
Get the outdegree of vertex `v` in `mg`.
395+
"""
381396
Graphs.outdegree(mg::M, v::V) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}} = length(outneighbors(mg, v))
397+
"""
398+
outdegree(mg::M, vs::AbstractVector{V} = vertices(mg)) where {T,M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}}
399+
400+
Get the vector of outdegrees of vertices `vs` in `mg`.
401+
"""
382402
Graphs.outdegree(mg::M, vs::AbstractVector{V} = vertices(mg)) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}} = [outdegree(mg, x) for x in vs]
383403

404+
"""
405+
degree(mg::M, v::V) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}}
406+
407+
Get the degree of vertices `vs` in `mg`.
408+
"""
384409
Graphs.degree(mg::M, vs::AbstractVector{V} = vertices(mg)) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}} = [degree(mg, x) for x in vs]
385410

411+
"""
412+
neighbors(mg::M, v::V) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}}
413+
414+
Get the neighbors of vertices `vs` in `mg`. Reduces to `outneighbors` for both directed and undirected multilayer graphs.
415+
"""
386416
Graphs.neighbors(mg::M, v::V) where {T, M <: AbstractMultilayerGraph{T, <: Real}, V <: MultilayerVertex{T}} = outneighbors(mg, v)
387417

388418
"""

0 commit comments

Comments
 (0)