ingSegments.length) {
                    var seg2 = q2.overlappingSegments[j];
                    // some segments can overlap many quantums,
                    // we don't want this self segue, so give them a
                    // high distance
                    if (seg1.which === seg2.which) {
                        distance = 100
                    } else {
                        distance = get_seg_distances(seg1, seg2);
                    }
                }
                sum += distance;
  