getComponentsAdjacencyMatrix() {
    let length = this.vertices.length;
    let adjacencyMatrix = Array(length);
    let bridges = this.getBridges();

    for (var i = 0; i < length; i++) {
      adjacencyMatrix[i] = new Array(length);
      adjacencyMatrix[i].fill(0);
    }

    for (var i = 0; i < this.edges.length; i++) {
      let edge = this.edges[i];
      adjacencyMatrix[edge.sourceId][edge.targetId] = 1;
      adjacencyMatrix[edge.targetId][edge.sourceId] = 1;
    }

    for (var i = 0; i < bridges.length; i++) {
      adjacencyMatrix[bridges[i][0]][bridges[i][1]] = 0;
      adjacencyMatrix[bridges[i][1]][bridges[i][0]] = 0;
    }

    return adjacencyMatrix;
  }
Get the adjacency matrix of the graph with all bridges removed (thus the components). Thus the remaining vertices are all part of ring systems.

@returns {Array[]} The adjancency matrix of the molecular graph with all bridges removed.