Skip to content

Commit f0a2c50

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

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
lines changed

docs/src/API.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ get_symmetric_interlayer(
129129
interlayer::In;
130130
symmetric_interlayer_name::String = String(interlayer.name) * "_rev"
131131
) where {T,U,G,In<:Interlayer{T,U,G}}
132-
133-
134132
```
135133

136134
### Multilayer-Specific Methods
@@ -286,8 +284,6 @@ modularity(
286284
287285
288286
von_neumann_entropy(mg::M) where {T,U,M<:AbstractMultilayerUGraph{T,U}}
289-
290-
291287
```
292288

293289
### Representations
@@ -300,7 +296,6 @@ metadata_tensor(mg::M) where {T,U, M <: AbstractMultilayerGraph{T,U}}
300296
array(amr::AbstractMatrixRepresentation)
301297
SupraWeightMatrix{T,U}
302298
supra_weight_matrix(mg::M) where {T,U, M <: AbstractMultilayerGraph{T,U}}
303-
304299
```
305300

306301
### Traits
@@ -312,6 +307,16 @@ is_meta(g::G) where {G <: AbstractGraph}
312307
is_meta(g::G) where {G<:Type{<:AbstractGraph}}
313308
```
314309

310+
### Utilities
311+
```@docs
312+
multilayer_kronecker_delta(dims::NTuple{4,Int64})
313+
δk{T}
314+
δk(N::Int64)
315+
δ_1{T<: Number}
316+
δ_2{T<:Number}
317+
δ_3{T<:Number}
318+
δ_Ω{T}
319+
```
315320

316321

317322
----------------------------------------------------
@@ -374,12 +379,10 @@ AbstractInterlayer
374379
AbstractMultilayerGraph{T <: Integer, U <: Real}
375380
has_vertex(mg::M, v::T) where {T, M <: AbstractMultilayerGraph{T}}
376381
vertices(mg::AbstractMultilayerGraph)
377-
inneighbors(mg::AbstractMultilayerUGraph, v::T) where {T <: Integer, M <: AbstractMultilayerUGraph{T}}
378-
inneighbors(mg::M, v::T) where {T <: Integer, M <: AbstractMultilayerDiGraph{T}}
382+
inneighbors(mg::M, v::T) where {T,M<:AbstractMultilayerUGraph{T,<:Real}}
383+
inneighbors(mg::M, v::T) where {T, M<:AbstractMultilayerGraph{T,<:Real}}
379384
inneighbors(mg::AbstractMultilayerGraph, mv::MultilayerVertex)
380-
outneighbors(mg::M, v::T) where {M <: AbstractMultilayerGraph{T} } where { T <: Integer}
381-
outneighbors(mg::M, v::T) where {M <: AbstractMultilayerGraph{T} } where { T <: Integer}
382-
outneighbors(mg::M, v::T) where {M <: AbstractMultilayerGraph{T} } where { T <: Integer}
385+
outneighbors(mg::M, v::T) where {T, M<:AbstractMultilayerGraph{T}}
383386
neighbors(mg::AbstractMultilayerGraph, mv::MultilayerVertex)
384387
edgetype(::M) where {T,U,M<:AbstractMultilayerGraph{T,U}}
385388
has_edge(mg::M, src::T, dst::T) where { T, M <: AbstractMultilayerUGraph{T}}
@@ -399,8 +402,4 @@ AbstractMatrixRepresentation{T,U}
399402
```@docs
400403
IsWeighted{X}
401404
IsMeta{X}
402-
```
403-
404-
405-
```@docs
406-
```
405+
```

src/abstractmultilayerdigraph.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,13 @@ Return `true` if `mg` is directed, `false` otherwise.
373373
Graphs.is_directed(mg::M) where {M<:Type{<:AbstractMultilayerDiGraph}} = true
374374

375375
"""
376-
inneighbors(mg::M, v::T) where {M <: AbstractMultilayerDiGraph{T} } where { T <: Integer}
376+
inneighbors(mg::M, v::T
377+
) where {T, M<:AbstractMultilayerGraph{T,<:Real}}
378+
377379
378380
Return the list of inneighbors of `v` within `mg`.
379381
"""
380-
function Graphs.inneighbors(mg::M, v::T
381-
) where {M<:AbstractMultilayerGraph{T,<:Real}} where {T}
382+
function Graphs.inneighbors(mg::M, v::T) where {T, M<:AbstractMultilayerGraph{T,<:Real}}
382383

383384
_inneighbors = T[]
384385

src/abstractmultilayergraph.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,13 +524,13 @@ Graphs.outneighbors( mg::AbstractMultilayerGraph, mv::MultilayerVertex) = outnei
524524

525525

526526
"""
527-
outneighbors(mg::M, v::T) where {M <: AbstractMultilayerGraph{T} } where { T <: Integer}
527+
outneighbors(mg::M, v::T) where {T, M<:AbstractMultilayerGraph{T}}
528528
529529
Return the list of outneighbors of `v` within `mg`.
530530
"""
531531
function Graphs.outneighbors(
532532
mg::M, v::T
533-
) where {M<:AbstractMultilayerGraph{T,<:Real}} where {T}
533+
) where {T, M<:AbstractMultilayerGraph{T}}
534534

535535
_outneighbors = T[]
536536

src/abstractmultilayerugraph.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Return `true` if `mg` is directed, `false` otherwise.
342342
Graphs.is_directed(mg::M) where {M<:Type{<:AbstractMultilayerUGraph}} = false
343343

344344
"""
345-
inneighbors(mg::M, v::T) where {M <: AbstractMultilayerUGraph{T} } where { T <: Integer}
345+
inneighbors(mg::M, v::T) where {T,M<:AbstractMultilayerUGraph{T,<:Real}}
346346
347347
Return the list of inneighbors of `v` within `mg`.
348348
"""

src/utilities.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function check_unique(vec::Union{Missing,<:Vector,<:Tuple})
3535
end
3636

3737
"""
38-
multilayer_kronecker_delta(dims...)
38+
multilayer_kronecker_delta(dims::NTuple{4,Int64})
3939
4040
Return a 4-dimensional Kronecker delta with size equal to `dims`.
4141
"""
@@ -97,7 +97,8 @@ The Kronecker delta.
9797
- `representation::Matrix{Int64}`: the matrix representing the Kronecker delta;
9898
- `T`: the return type when called `δk[i,j]`.
9999
100-
# CONSTRUCTORS
100+
### CONSTRUCTORS
101+
101102
102103
δk{T}(N::Int64) where {T <: Number}
103104
@@ -108,6 +109,7 @@ mutable struct δk{T} <: AbstractVector{T}
108109
representation::Matrix{Int64}
109110

110111
# Inner constructor that only requires N and the eltype.
112+
111113
function δk{T}(N::Int64) where {T<:Number}
112114
out = new{T}(N)
113115
representation = [out[h, k] for h in 1:N, k in 1:N]

0 commit comments

Comments
 (0)