Skip to content

Commit cab4148

Browse files
InterdisciplinaryPhysicsTeampitmonticoneClaudMor
committed
Update docstrings
Co-Authored-By: Pietro Monticone <[email protected]> Co-Authored-By: Claudio Moroni <[email protected]>
1 parent f2c9e8a commit cab4148

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[deps]
2+
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
23
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
34
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
45
MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5"

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Revise
2+
using Distributions
23
using Graphs
34
using MultilayerGraphs
45
using Documenter

docs/src/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ outneighbors(subgraph::AbstractSubGraph, mv::MultilayerVertex)
358358
neighbors(subgraph::S, v::T) where {T,S<:AbstractSubGraph{T}}
359359
neighbors(subgraph::AbstractSubGraph, mv::MultilayerVertex)
360360
edgetype(::S) where {T,U,S<:AbstractSubGraph{T,U}}
361-
has_edge(subgraph::S, s::MultilayerVertex, d::MultilayerVertex) where { T, S <: AbstractSubGraph{T}}
361+
has_edge( subgraph::S, s::T, d::T) where {T,S<:AbstractSubGraph{T}}
362362
add_edge!(subgraph::S, src::T, dst::T; weight::W = nothing, metadata::Union{Tuple, NamedTuple}= NamedTuple()) where {T, U<: Real, W<:Union{ U, Nothing},G<:AbstractGraph{T},S<:AbstractSubGraph{T,U,G}}
363363
rem_edge!(subgraph::S, src::T, dst::T) where {T, S<:AbstractSubGraph{T}}
364364
AbstractLayer

src/abstractmultilayergraph.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ degree_variance(mg::AbstractMultilayerGraph) = var(degree(mg))
780780
norm_factor::Union{Float64,Symbol}=:max
781781
)
782782
783-
Return the complete multilayer global clustering coefficient, equal to the ratio of realized triplets over all possible triplets, including those whose every or some edges belong to interlayers, normalized by `norm_factor`. If `norm_factor == :max`, then the ratio is normalized by `maximum(mg.array)`. This function does not override Graphs.jl's `global_clustering_coefficient`, since the latter does not consider cliques where two nodes are the same node but in different layers/interlayers. See [De Domenico et al. (2013)](https://doi.org/10.1103/PhysRevX.3.041022).
783+
Return the complete multilayer global clustering coefficient, equal to the ratio of realized triplets over all possible triplets, including those whose every or some edges belong to interlayers, normalized by `norm_factor`. If `norm_factor == :max`, then the ratio is normalized by `maximum(array(weight_tensor(mg)))`, else it is not normalized. This function does not override Graphs.jl's `global_clustering_coefficient`, since the latter does not consider cliques where two nodes are the same node but in different layers/interlayers. See [De Domenico et al. (2013)](https://doi.org/10.1103/PhysRevX.3.041022).
784784
"""
785785
function multilayer_global_clustering_coefficient(
786786
mg::AbstractMultilayerGraph, norm_factor::Union{Float64,Symbol}=:max
@@ -816,7 +816,7 @@ end
816816
"""
817817
multilayer_weighted_global_clustering_coefficient(mg::M, norm_factor::Union{Float64, Symbol} = :max) where {M <: AbstractMultilayerGraph}
818818
819-
Return the complete multilayer global clustering coefficient, equal to the ratio of realized triplets over all possible triplets, including those whose every or some edges belong to interlayers, normalized by `norm_factor`. Each triplets contributes for `w[1]` if all of its vertices are in one layer, `w[2]` if its vertices span two layers, and `w[3]` if they span 3 layers. If `norm_factor == :max`, then the ratio is normalized by `maximum(mg.array)`. This function does not override Graphs.jl's `global_clustering_coefficient`, since the latter does not consider cliques where two nodes are the same node but in different layers/interlayers. See [De Domenico et al. (2013)](https://doi.org/10.1103/PhysRevX.3.041022).
819+
Return the complete multilayer global clustering coefficient, equal to the ratio of realized triplets over all possible triplets, including those whose every or some edges belong to interlayers, normalized by `norm_factor`. Each triplets contributes for `w[1]` if all of its vertices are in one layer, `w[2]` if its vertices span two layers, and `w[3]` if they span 3 layers. If `norm_factor == :max`, then the ratio is normalized by `maximum(array(weight_tensor(mg)))`, else it is not normalized. This function does not override Graphs.jl's `global_clustering_coefficient`, since the latter does not consider cliques where two nodes are the same node but in different layers/interlayers. See [De Domenico et al. (2013)](https://doi.org/10.1103/PhysRevX.3.041022).
820820
"""
821821
function multilayer_weighted_global_clustering_coefficient(
822822
mg::M, w::Vector{Float64}, norm_factor::Union{Float64,Symbol}=:max
@@ -851,7 +851,7 @@ end
851851
norm_factor::Union{Float64,Symbol}=:max
852852
)
853853
854-
Return the overlay clustering coefficient as calculated in [De Domenico et al. (2013)](https://doi.org/10.1103/PhysRevX.3.041022).
854+
Return the overlay clustering coefficient as calculated in [De Domenico et al. (2013)](https://doi.org/10.1103/PhysRevX.3.041022). If `norm_factor == :max`, then the ratio is normalized by `maximum(array(weight_tensor(mg)))`, else it is not normalized.
855855
"""
856856
function overlay_clustering_coefficient(
857857
mg::AbstractMultilayerGraph, norm_factor::Union{Float64,Symbol}=:max

src/subgraphs/abstractsubgraph.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Return `true` if there is an edge between `s` and `d`, `false` otherwise.
203203
Graphs.has_edge( subgraph::AbstractSubGraph, s::MultilayerVertex, d::MultilayerVertex) = has_edge(subgraph, get_v(subgraph, s), get_v(subgraph, d))
204204

205205
"""
206-
has_edge(subgraph::S, s::MultilayerVertex, d::MultilayerVertex) where { T, S <: AbstractSubGraph{T}}
206+
has_edge( subgraph::S, s::T, d::T) where {T,S<:AbstractSubGraph{T}}
207207
208208
Return `true` if there is an edge between `s` and `d`, `false` otherwise.
209209
"""

0 commit comments

Comments
 (0)