1+ """
2+ abstract type AbstractSubGraph{T <: Integer,U <: Real,G <: AbstractGraph{T}}
3+
4+ An abstract type representing a subgraph (i.e. a layer or an interlayer).
5+ """
16abstract type AbstractSubGraph{T <: Integer ,U <: Real ,G <: AbstractGraph{T} } end
27
38# Nodes
49"""
5- nodes(subgraph::S) where { S <: AbstractSubGraph}
10+ nodes(subgraph::AbstractSubGraph)
611
712Return the collection of the nodes of `subgraph`.
813"""
9- nodes (subgraph:: S ) where {S <: AbstractSubGraph } = unique ([mv. node for mv in mv_vertices (subgraph)])
14+ nodes (subgraph:: AbstractSubGraph ) = unique ([mv. node for mv in mv_vertices (subgraph)])
1015
1116# Vertices
1217"""
13- Base.eltype(subgraph::S) where { S <: AbstractSubGraph}
18+ Base.eltype(subgraph::AbstractSubGraph)
1419
1520Return the vertex type of `subgraph`.
1621"""
17- Base. eltype (subgraph:: S ) where {S <: AbstractSubGraph } = typeof (subgraph). parameters[1 ]
22+ Base. eltype (subgraph:: AbstractSubGraph ) = typeof (subgraph). parameters[1 ]
1823
1924"""
20- has_vertex(subgraph::S, v::T ) where {T,U,G, S<:AbstractSubGraph{T,U,G }}
25+ has_vertex( subgraph::S, v::T ) where {T,S<:AbstractSubGraph{T}}
2126
2227Return `true` if `v` is a vertex of `subgraph`.
2328"""
24- Graphs. has_vertex ( subgraph:: S , v:: T ) where {T,U,G, S<: AbstractSubGraph{T,U,G } } = has_vertex (subgraph. graph, v)
29+ Graphs. has_vertex (subgraph:: S , v:: T ) where {T,S<: AbstractSubGraph{T} } = has_vertex (subgraph. graph, v)
2530
2631"""
27- nv(subgraph::S) where { S <: AbstractSubGraph}
32+ nv(subgraph::AbstractSubGraph)
2833
2934Return the number of vertices in `subgraph`.
3035"""
31- Graphs. nv (subgraph:: S ) where {S <: AbstractSubGraph } = nv (subgraph. graph) # length(vertices(subgraph))
36+ Graphs. nv (subgraph:: AbstractSubGraph ) = nv (subgraph. graph) # length(vertices(subgraph))
3237
3338"""
34- vertices(subgraph::S) where {S <: AbstractSubGraph{ <: Integer, <: AbstractSimpleGraph}}
39+ vertices(subgraph::AbstractSubGraph)
3540
3641Return the collection of the vertices of `subgraph`.
3742"""
38- Graphs. vertices (subgraph:: S ) where {S <: AbstractSubGraph } = vertices (subgraph. graph)
43+ Graphs. vertices (subgraph:: AbstractSubGraph ) = vertices (subgraph. graph)
3944
4045"""
41- mv_vertices(subgraph::S) where {S <: AbstractSubGraph{ <: Integer, <: AbstractSimpleGraph}}
46+ mv_vertices(subgraph::AbstractSubGraph)
4247
4348Return the collection of the `MultilayerVertex`s of `subgraph`.
4449"""
45- mv_vertices (subgraph:: S ) where {S <: AbstractSubGraph } = get_rich_mv .(Ref (subgraph), vertices (subgraph))
50+ mv_vertices (subgraph:: AbstractSubGraph ) = get_rich_mv .(Ref (subgraph), vertices (subgraph))
4651
4752"""
48- inneighbors(subgraph::S, v::T) where {T,U,G, S <: AbstractSubGraph{T,U,G }}
53+ inneighbors(subgraph::S, v::T) where {T, S <: AbstractSubGraph{T}}
4954
5055Return the list of inneighbors of `v` within `subgraph`.
5156"""
52- Graphs. inneighbors (subgraph:: S , v:: T ) where {T,U,G, S<: AbstractSubGraph{T,U,G } } = inneighbors (subgraph. graph, v)
57+ Graphs. inneighbors (subgraph:: S , v:: T ) where {T,S<: AbstractSubGraph{T} } = inneighbors (subgraph. graph, v)
5358
5459"""
55- inneighbors(subgraph::S , mv::MultilayerVertex) where {T,U,G, S <: AbstractSubGraph{T,U,G}}
60+ inneighbors(subgraph::AbstractSubGraph , mv::MultilayerVertex)
5661
5762Return the list of inneighbors of `mv` within `subgraph`.
5863"""
59- Graphs. inneighbors (subgraph:: S , mv:: MultilayerVertex ) where {T,U,G,S <: AbstractSubGraph{T,U,G} } = inneighbors (subgraph, get_v (subgraph,mv))
64+ Graphs. inneighbors (subgraph:: AbstractSubGraph , mv:: MultilayerVertex ) = inneighbors (subgraph, get_v (subgraph,mv))
6065
6166"""
6267 mv_inneighbors(subgraph::AbstractSubGraph, mv::MultilayerVertex)
@@ -66,18 +71,18 @@ Return the `MultilayerVertex`s inneighbors of `mv` within `subgraph`.
6671mv_inneighbors (subgraph:: AbstractSubGraph , mv:: MultilayerVertex ) = get_rich_mv .(Ref (subgraph), inneighbors (subgraph,mv))
6772
6873"""
69- outneighbors(subgraph::S, v::T) where {T,U,G, S <: AbstractSubGraph{T,U,G }}
74+ outneighbors(subgraph::S, v::T) where {T,S<: AbstractSubGraph{T}}
7075
7176Return the list of outneighbors of `v` within `subgraph`.
7277"""
73- Graphs. outneighbors (subgraph:: S , v:: T ) where {T,U,G, S<: AbstractSubGraph{T,U,G } } = outneighbors (subgraph. graph, v)
78+ Graphs. outneighbors (subgraph:: S , v:: T ) where {T,S<: AbstractSubGraph{T} } = outneighbors (subgraph. graph, v)
7479
7580"""
76- outneighbors(subgraph::S , mv::MultilayerVertex) where {T,U,G, S <: AbstractSubGraph{T,U,G}}
77-
81+ outneighbors(subgraph::AbstractSubGraph , mv::MultilayerVertex)
82+
7883Return the list of outneighbors of `mv` within `subgraph`.
7984"""
80- Graphs. outneighbors (subgraph:: S , mv:: MultilayerVertex ) where {T,U,G,S <: AbstractSubGraph{T,U,G} } = outneighbors (subgraph, subgraph. v_V_associations (get_bare_mv (mv)))
85+ Graphs. outneighbors (subgraph:: AbstractSubGraph , mv:: MultilayerVertex ) = outneighbors (subgraph, subgraph. v_V_associations (get_bare_mv (mv)))
8186
8287"""
8388 mv_outneighbors(subgraph::AbstractSubGraph, mv::MultilayerVertex)
0 commit comments