mixingmatrix: optimal mixing matrices for graphs
Computes the edge weights that make averaging, gossip or a random walk converge as fast as possible on a given graph — the fastest-mixing Markov chain problem (Boyd, Diaconis & Xiao 2004) and its free-weight variant FDLA (Xiao & Boyd 2004). Returns a sparse weight matrix together with a rigorous bound on the distance from optimality obtained from the dual, and ships the standard heuristic weightings so the comparison can be made on the user's own graph in one call. Supports incremental re-solving under topology change, certifying from the dual when a change provably leaves the optimum unmoved.