statnet / ergm

Fit, Simulate and Diagnose Exponential-Family Models for Networks
Other
98 stars 37 forks source link

Enable UnsrtEL to remember multiple last-sampled/last-inserted edges? #548

Closed krivit closed 9 months ago

krivit commented 10 months ago

Currently, it remembers only the last edge inserted or the last edge sampled. This can be inefficient (#239, #547) if the proposal involves multiple toggles or insertions, but their number is relatively small, so HashEL may be overkill.

It should be straightforward to change el->lindex from an integer to a stack that searches the last k elements. k could be set at initialisation.

@chad-klumb , what do you think?