code: function computeWeight(i) {
      if(dead[i]) {
        return Infinity
      }
      //TODO: Check that the line segment doesn't cross once simplified
      var s = inv[i]
      var t = outv[i]
      if((s<0) || (t<0)) {
        return Infinity
      } else {
        return errorWeight(positions[i], positions[s], positions[t])
      }
    }
docs: Updates the weight for vertex i