If they also change their Intensity in response to that event, sure. (if something else then I don't know what you mean)
BillWoodruff wrote:You see the possibility of runaway recursion if both Edges subscribe PropertyChanging to each other.
Sure, I guess? But where do you keep that count and whose responsibility is this etc, idk ultimately it seems like a bit of hack.
BillWoodruff wrote:keep a count ? enforce a limit ?
Reading between the lines, here's what I think is going on:
So here's my proposal: run that algorithm on the matrix. That doesn't sound it means anything, but it does. It means, forget imbuing the individual edges with agency (at least in this context). It's the matrix as a whole that has a property that you want to restore, and the algorithm works on the matrix as a whole (hopefully not every entry needs to be changed). There's no difficulty now in running a limited number of iterations of an incremental algorithm or anything of that nature. You can just do that, explicitly, in one place.
- You have some sparse matrix.
- You updated one entry in it.
- You need to run some algorithm to restore some property.
Such a zoomed-out view may also help when implementing other matrix-based graph algorithms such as eigenvector centrality or whatever (do social networks use that? I don't know what social networks actually do to be honest).
But I don't really know what you're doing, maybe none of this applies to your situation.