Skip to content

Commit cd46ead

Browse files
InterdisciplinaryPhysicsTeamClaudMorpitmonticone
committed
Update interlayer.jl
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com> Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
1 parent 25b3b52 commit cd46ead

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/subgraphs/interlayer.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ end
108108
default_edge_metadata::Function = (x,y) -> NamedTuple(),
109109
transfer_vertex_metadata::Bool = false,
110110
name::Symbol
111+
111112
) where {T<:Integer, U <: Real, G<:AbstractGraph{T}}
112113
113114
Constructor for Interlayer.
@@ -116,15 +117,15 @@ Constructor for Interlayer.
116117
117118
- `layer_1::Layer{T,U}`: one of the two layers connected by the Interlayer;
118119
- `layer_2::Layer{T,U}`: one of the two layers connected by the Interlayer;
119-
- `ne::Int64`: The number of edges of the Interlayer
120+
- `ne::Int64`: The number of edges of the Interlayer;
120121
- `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.
121122
122123
# KWARGS
123124
124125
- `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`;
125126
- `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()`;
126127
- `name::Symbol`: The name of the Interlayer. Defaults to Symbol("interlayer_(layer_1.name)_(layer_2.name)");
127-
- `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.;
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.
128129
129130
"""
130131
function Interlayer(
@@ -199,19 +200,18 @@ end
199200
200201
Return a random `Interlayer`.
201202
202-
# ARGS
203-
-`layer_1::Layer{T,U}`: one of the two layers connected by the Interlayer;
204-
-`layer_2::Layer{T,U}`: one of the two layers connected by the Interlayer;
205-
-`ne::Int64`: The number of edges of the Interlayer
203+
# ARGUMENTS
204+
- `layer_1::Layer{T,U}`: one of the two layers connected by the Interlayer;
205+
- `layer_2::Layer{T,U}`: one of the two layers connected by the Interlayer;
206+
- `ne::Int64`: The number of edges of the Interlayer;
206207
`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.
207208
208209
# KWARGS
209210
210-
-`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`;
211-
-`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()`;
212-
-`name::Symbol`: The name of the Interlayer. Defaults to Symbol("interlayer_(layer_1.name)_(layer_2.name)");
213-
-`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.;
214-
211+
- `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`;
212+
- `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()`;
213+
- `name::Symbol`: The name of the Interlayer. Defaults to Symbol("interlayer_(layer_1.name)_(layer_2.name)");
214+
- `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.
215215
"""
216216
function Interlayer(
217217
layer_1::Layer{T,U},

0 commit comments

Comments
 (0)