Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
WhereTraits = "c9d4e05b-6318-49cb-9b56-e0e2b0ceadd8"

[compat]
Bijections = "0.1"
Bijections = "0.2"
DataStructures = "0.18, 0.19"
Distributions = "0.25"
Graphs = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/abstractmultilayergraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fadjlist(mg::AbstractMultilayerGraph) = mg.fadjlist
Return the nodes of the AbstractMultilayerGraph `mg`, in order of addition.
"""
function nodes(mg::AbstractMultilayerGraph)
return [couple[2] for couple in sort(collect(mg.idx_N_associations); by=first)]
return Node[node for (_, node) in sort!(collect(mg.idx_N_associations); by=first)]
end

"""
Expand Down
2 changes: 1 addition & 1 deletion src/multilayerdigraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mutable struct MultilayerDiGraph{T,U} <: AbstractMultilayerGraph{T,U}
layers::Vector{LayerDescriptor{T,U}} # vector containing all the layers of the multilayer graph. Their underlying graphs must be all undirected.
interlayers::OrderedDict{Set{Symbol},InterlayerDescriptor{T,U}} # the ordered dictionary containing all the interlayers of the multilayer graph. Their underlying graphs must be all undirected.
v_V_associations::Bijection{T,<:MultilayerVertex} # A Bijection from Bijections.jl that associates numeric vertices to `MultilayerVertex`s.
idx_N_associations::Bijection{Int64,Node} # A Bijection from Bijections.jl that associates Int64 to `Node`s.
idx_N_associations::Bijection{Int64,Node,Dict{Int64,Node},Dict{Node,Int64}} # A Bijection from Bijections.jl that associates Int64 to `Node`s.
fadjlist::Vector{Vector{HalfEdge{<:MultilayerVertex,<:Union{Nothing,U}}}} # the forward adjacency list of the MultilayerDiGraph. It is a vector of vectors of `HalfEdge`s. Its i-th element are the `HalfEdge`s that originate from `v_V_associations[i]`.
badjlist::Vector{Vector{HalfEdge{<:MultilayerVertex,<:Union{Nothing,U}}}} # the backward adjacency list of the MultilayerDiGraph. It is a vector of vectors of `HalfEdge`s. Its i-th element are the `HalfEdge`s that insist on `v_V_associations[i]`.
v_metadata_dict::Dict{T,<:Union{<:Tuple,<:NamedTuple}} # A Dictionary that associates numeric vertices to their metadata
Expand Down
2 changes: 1 addition & 1 deletion src/multilayergraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mutable struct MultilayerGraph{T,U} <: AbstractMultilayerGraph{T,U}
layers::Vector{LayerDescriptor{T,U}} # vector containing all the layers of the multilayer graph. Their underlying graphs must be all undirected.
interlayers::OrderedDict{Set{Symbol},InterlayerDescriptor{T,U}} # the ordered dictionary containing all the interlayers of the multilayer graph. Their underlying graphs must be all undirected.
v_V_associations::Bijection{T,<:MultilayerVertex} # A Bijection from Bijections.jl that associates numeric vertices to `MultilayerVertex`s.
idx_N_associations::Bijection{Int64,Node} # A Bijection from Bijections.jl that associates Int64 to `Node`s.
idx_N_associations::Bijection{Int64,Node,Dict{Int64,Node},Dict{Node,Int64}} # A Bijection from Bijections.jl that associates Int64 to `Node`s.
fadjlist::Vector{Vector{HalfEdge{<:MultilayerVertex,<:Union{Nothing,U}}}} # the forward adjacency list of the MultilayerGraph. It is a vector of vectors of `HalfEdge`s. Its i-th element are the `HalfEdge`s that originate from `v_V_associations[i]`.
v_metadata_dict::Dict{T,<:Union{<:Tuple,<:NamedTuple}} # A Dictionary that associates numeric vertices to their metadata.
end
Expand Down
Loading