static bondsToAtoms(bonds) {
    let atoms = new Set();
    var i = bonds.length;

    while (i--) {
      atoms.add(bonds[i][0]);
      atoms.add(bonds[i][1]);
    }

    return atoms;
  }
Return a set of vertex indices contained in an array of bonds.

@param {Array} bonds An array of bonds. A bond is defined as [ sourceVertexId, targetVertexId ].
@returns {Set<Number>} An array of vertices.