getAdjacencyList() {
    let length = this.vertices.length;
    let adjacencyList = Array(length);

    for (var i = 0; i < length; i++) {
      adjacencyList[i] = [];

      for (var j = 0; j < length; j++) {
        if (i === j) {
          continue;
        }

        if (this.hasEdge(this.vertices[i].id, this.vertices[j].id)) {
          adjacencyList[i].push(j);
        }
      }
    }

    return adjacencyList;
  }
Get the adjacency list of the graph.

@returns {Array[]} The adjancency list of the graph.