nocad.placement.centrality_retrofit#

nocad.placement.centrality_retrofit(adj, nodes, r_max, max_rounds=None)[source]#

Centrality-based retrofit (MATLAB analyseComponents).

The states are assigned to their nearest configured node (control regions). In every region whose largest distance exceeds \(r_{\max}\) (and among the states that no configured node reaches) the node maximizing \(B(i)\,C^{out}(i)\) in the induced subnetwork is added, where \(B\) is the normalized betweenness and \(C^{out}\) the out-closeness. The rounds repeat until the bound holds.

Notes

The MATLAB function recurses into each region with the old and the new node; here the whole network is re-partitioned after every round, which gives the same result when the regions do not interact and always terminates.