static pathSetsContain(pathSets, pathSet, bonds, allBonds, arrBondCount, arrRingCount) {
    var i = pathSets.length;

    while (i--) {
      if (SSSR.isSupersetOf(pathSet, pathSets[i])) {
        return true;
      }

      if (pathSets[i].size !== pathSet.size) {
        continue;
      }

      if (SSSR.areSetsEqual(pathSets[i], pathSet)) {
        return true;
      }
    } // Check if the edges from the candidate are already all contained within the paths of the set of paths.
    // TODO: For some reason, this does not replace the isSupersetOf method above -> why?


    let count = 0;
    let allContained = false;
    i = bonds.length;

    while (i--) {
      var j = allBonds.length;

      while (j--) {
        if (bonds[i][0] === allBonds[j][0] && bonds[i][1] === allBonds[j][1] || bonds[i][1] === allBonds[j][0] && bonds[i][0] === allBonds[j][1]) {
          count++;
        }

        if (count === bonds.length) {
          allContained = true;
        }
      }
    } // If all the bonds and thus vertices are already contained within other rings
    // check if there's one vertex with ringCount < bondCount


    let specialCase = false;

    if (allContained) {
      for (let element of pathSet) {
        if (arrRingCount[element] < arrBondCount[element]) {
          specialCase = true;
          break;
        }
      }
    }

    if (allContained && !specialCase) {
      return true;
    } // Update the ring counts for the vertices


    for (let element of pathSet) {
      arrRingCount[element]++;
    }

    return false;
  }
Checks whether or not a given path already exists in an array of paths.

@param {Set[]} pathSets An array of sets each representing a path.
@param {Set<Number>} pathSet A set representing a path.
@param {Array[]} bonds The bonds associated with the current path.
@param {Array[]} allBonds All bonds currently associated with rings in the SSSR set.
@param {Uint16Array} arrBondCount A matrix containing the bond count of each vertex.
@param {Uint16Array} arrRingCount A matrix containing the number of rings associated with each vertex.
@returns {Boolean} A boolean indicating whether or not a give path is contained within a set.