areVerticesInSameRing(vertexA, vertexB) {
    // This is a little bit lighter (without the array and push) than
    // getCommonRings().length > 0
    for (var i = 0; i < vertexA.value.rings.length; i++) {
      for (var j = 0; j < vertexB.value.rings.length; j++) {
        if (vertexA.value.rings[i] === vertexB.value.rings[j]) {
          return true;
        }
      }
    }

    return false;
  }
Checks whether or not two vertices are in the same ring.

@param {Vertex} vertexA A vertex.
@param {Vertex} vertexB A vertex.
@returns {Boolean} A boolean indicating whether or not the two vertices are in the same ring.