You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Registration](https://github.com/JuliaRegistries/General/pull/66311) is under way.
31
30
32
31
[Registration](https://github.com/JuliaRegistries/General/pull/66311) is in progress.
33
32
34
33
## Tutorial
35
34
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).
37
36
38
37
## Future Developments
39
38
@@ -54,12 +53,14 @@ Here we highlight the major future developments we have currently identified:
54
53
55
54
## How to Contribute
56
55
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!
58
59
59
60
## How to Cite
60
61
61
62
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).
62
63
63
64
## References
64
65
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*.
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!
524
527
525
528
## How to Cite
526
529
527
530
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).
528
531
529
532
## References
530
533
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*.
Copy file name to clipboardExpand all lines: src/abstractmultilayergraph.jl
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -375,14 +375,44 @@ Return the nodes of the AbstractMultilayerGraph `mg`.
375
375
nodes(mg::M) where {M <:AbstractMultilayerGraph} = [vertex.node for vertex invertices(mg.layers[(1,1)])]
376
376
377
377
# 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
+
"""
378
383
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
+
"""
379
389
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]
380
390
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
+
"""
381
396
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
+
"""
382
402
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]
383
403
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
+
"""
384
409
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]
385
410
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
+
"""
386
416
Graphs.neighbors(mg::M, v::V) where {T, M <:AbstractMultilayerGraph{T, <: Real}, V <:MultilayerVertex{T}} =outneighbors(mg, v)
0 commit comments