Avoid double factorization in algebraic_connectivity