constructor(edgeDirection = Graph.DIRECTED) {
    this.nodes = new HashMap();
    this.edgeDirection = edgeDirection;
  }
Initialize the nodes map
@param {Symbol} edgeDirection either `Graph.DIRECTED` or `Graph.UNDIRECTED`