static getRingCandidates(d, pe, pe_prime) {
    let length = d.length;
    let candidates = Array();
    let c = 0;

    for (let i = 0; i < length; i++) {
      for (let j = 0; j < length; j++) {
        if (d[i][j] === 0 || pe[i][j].length === 1 && pe_prime[i][j] === 0) {
          continue;
        } else {
          // c is the number of vertices in the cycle.
          if (pe_prime[i][j].length !== 0) {
            c = 2 * (d[i][j] + 0.5);
          } else {
            c = 2 * d[i][j];
          }

          if (c !== Infinity) {
            candidates.push([c, pe[i][j], pe_prime[i][j]]);
          }
        }
      }
    } // Candidates have to be sorted by c


    candidates.sort(function (a, b) {
      return a[0] - b[0];
    });
    return candidates;
  }
Get the ring candidates from the path-included distance matrices.

@param {Array[]} d The distance matrix.
@param {Array[]} pe A matrix containing the shortest paths.
@param {Array[]} pe_prime A matrix containing the shortest paths + one vertex.
@returns {Array[]} The ring candidates.