You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We may replace them with Integers (of type N <: Integer, to be added as the third AbstractMultilayerGraphs parametric type). This would imply:
Substituting the node::Node field of MutlilayerVertex to a node::N (where {N <: Integer});
Reimplementing rem_node!(mg::AbstractMultilayerGraph{T,U,N}, n::N) where {T, U, N} so that it updates the node field of the MultilayerVertexs stored in v_V_associations that have node > n.
Replacing Nodes with Integers would have the following benefits:
Simpler code throughout the codebase except for rem_node!;
Better performance of fadjlist and badjlist.
And the disadvantages hereafter:
Need to keep and maintain an external mapping to associate integer nodes to their "meaning" (i.e. the agent they may represent if one uses an AbstractMultilayerGraph as an argument to Agents.jl's GraphSpace, see Improve integration with Agents.jl #61.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Node
objects could be useless.We may replace them with
Integer
s (of typeN <: Integer
, to be added as the thirdAbstractMultilayerGraph
s parametric type). This would imply:node::Node
field ofMutlilayerVertex
to anode::N
(where {N <: Integer}
);rem_node!(mg::AbstractMultilayerGraph{T,U,N}, n::N) where {T, U, N}
so that it updates thenode
field of theMultilayerVertex
s stored inv_V_associations
that havenode
>n
.Replacing
Node
s withInteger
s would have the following benefits:rem_node!
;fadjlist
andbadjlist
.And the disadvantages hereafter:
AbstractMultilayerGraph
as an argument toAgents.jl
'sGraphSpace
, see Improve integration with Agents.jl #61.Beta Was this translation helpful? Give feedback.
All reactions