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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Nodeobjects could be useless.We may replace them with
Integers (of typeN <: Integer, to be added as the thirdAbstractMultilayerGraphs parametric type). This would imply:node::Nodefield ofMutlilayerVertexto anode::N(where {N <: Integer});rem_node!(mg::AbstractMultilayerGraph{T,U,N}, n::N) where {T, U, N}so that it updates thenodefield of theMultilayerVertexs stored inv_V_associationsthat havenode>n.Replacing
Nodes withIntegers would have the following benefits:rem_node!;fadjlistandbadjlist.And the disadvantages hereafter:
AbstractMultilayerGraphas an argument toAgents.jl'sGraphSpace, see Improve integration with Agents.jl #61.Beta Was this translation helpful? Give feedback.
All reactions