Iteratively reweighted least squares and slime mold dynamics: connection and convergence