Skip to content

Commit 62a3235

Browse files
InterdisciplinaryPhysicsTeampitmonticoneClaudMor
committed
Update docstrings
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com> Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
1 parent 10e0304 commit 62a3235

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

docs/src/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Interlayer(
9191
default_edge_weight::Function = (x,y) -> nothing,
9292
default_edge_metadata::Function = (x,y) -> NamedTuple(),
9393
transfer_vertex_metadata::Bool = false,
94-
name::Symbol = Symbol("interlayer_$(layer_1.name)_$(layer_2.name)")
94+
name::Symbol
9595
) where {T<:Integer, U <: Real, G<:AbstractGraph{T}}
9696
9797

src/subgraphs/interlayer.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,23 @@ end
109109
default_edge_metadata::Function = (x,y) -> NamedTuple(),
110110
transfer_vertex_metadata::Bool = false,
111111
name::Symbol
112-
113112
) where {T<:Integer, U <: Real, G<:AbstractGraph{T}}
114113
115114
Constructor for Interlayer.
116115
117116
# ARGUMENTS
118-
-`layer_1::Layer{T,U}`: one of the two layers connected by the Interlayer;
119-
-`layer_2::Layer{T,U}`: one of the two layers connected by the Interlayer;
120-
-`ne::Int64`: The number of edges of the Interlayer
121-
`null_graph::G`: the Interlayer's underlying graph type, which must be passed as a null graph. If it is not, an error will be thrown.
117+
118+
- `layer_1::Layer{T,U}`: one of the two layers connected by the Interlayer;
119+
- `layer_2::Layer{T,U}`: one of the two layers connected by the Interlayer;
120+
- `ne::Int64`: The number of edges of the Interlayer
121+
- `null_graph::G`: the Interlayer's underlying graph type, which must be passed as a null graph. If it is not, an error will be thrown.
122122
123123
# KWARGS
124124
125-
-`default_edge_weight::Function`: Function that takes a pair of `MultilayerVertex`s and returns an edge weight of type `weighttype` or `nothing` (which is compatible with unweighted underlying graphs and corresponds to `one(weighttype)` for weighted underlying graphs). Defaults to `(src, dst) -> nothing`;
126-
-`default_edge_metadata::Function`: Function that takes a pair of `MultilayerVertex`s and returns a `Tuple` or a `NamedTuple` containing the edge metadata, that will be called when `add_edge!(mg,src,dst, args...; kwargs...)` is called without the `metadata` keyword argument, and when generating the edges in this constructor. Defaults to `(src, dst) -> NamedTuple()`;
127-
-`name::Symbol`: The name of the Interlayer. Defaults to Symbol("interlayer_(layer_1.name)_(layer_2.name)");
128-
-`transfer_vertex_metadata::Bool`:if true, vertex metadata found in both connected layers are carried over to the vertices of the Interlayer. NB: not all choice of underlying graph may support this feature. Graphs types that don't support metadata or that pose limitations to it may result in errors.;
125+
- `default_edge_weight::Function`: Function that takes a pair of `MultilayerVertex`s and returns an edge weight of type `weighttype` or `nothing` (which is compatible with unweighted underlying graphs and corresponds to `one(weighttype)` for weighted underlying graphs). Defaults to `(src, dst) -> nothing`;
126+
- `default_edge_metadata::Function`: Function that takes a pair of `MultilayerVertex`s and returns a `Tuple` or a `NamedTuple` containing the edge metadata, that will be called when `add_edge!(mg,src,dst, args...; kwargs...)` is called without the `metadata` keyword argument, and when generating the edges in this constructor. Defaults to `(src, dst) -> NamedTuple()`;
127+
- `name::Symbol`: The name of the Interlayer. Defaults to Symbol("interlayer_(layer_1.name)_(layer_2.name)");
128+
- `transfer_vertex_metadata::Bool`:if true, vertex metadata found in both connected layers are carried over to the vertices of the Interlayer. NB: not all choice of underlying graph may support this feature. Graphs types that don't support metadata or that pose limitations to it may result in errors.;
129129
130130
"""
131131
function Interlayer(

src/subgraphs/layer.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ end
116116
default_edge_weight::Function = (src, dst) -> nothing,
117117
default_edge_metadata::Function = (src, dst) -> NamedTuple(),
118118
allow_self_loops::Bool = false
119-
120119
) where {T<:Integer, U <: Real, G<:AbstractGraph{T}}
121120
122121
Return a random `Layer`.

0 commit comments

Comments
 (0)