Open thednainus opened 3 years ago
It is likely that tergmLite will make your simulations much faster. No, there is no equivalent function for deactivate.edges because tergmLite works only with the cross-sectional edgelist, you can just delete any edges as needed. For example:
edges.to.delete <- XXX
el <- el[-edges.to.delete, , drop = FALSE]
A specialized function for vertices is needed because deleting vertices identified by a positional ID requires shifting the positional IDs of the remaining vertices in the edgelist with a prior higher ID number downward (e.g., node 3 dies, then node 4 becomes node 3, and all of node 4's edges have to updated accordingly). That's what shiftVec
does.
The meaning of el is list of edges (edges ID)? Or Are actually IDs of vertices?
el is the edgelist, which is a two-column matrix of edges in the cross section
I have just started to have a look at the
tergmLite
package to see if I can make my simulations faster and mayeb use less memory (?) as I am mainly interested in the transmission matrix. My test simulations in the cluster are very slow and using a lot of memory and maybe usingtergmLite = TRUE
would make it faster. Is there an equivalent function todeactivate.edges
in thetergmLite
package? Should I just remove the line below in thedelete_vertices
function?https://github.com/statnet/tergmLite/blob/b5a7ccfe054fed7709b0cb6b6e3c93a346ca0342/R/update.R#L128
I don't quite understand what the function
shiftVec
is doing.Thanks!