Initializes a graph where the adjacency structure is stored using a HashMap,
and adjacency information for a single node is stored in data structures created via
the provided supplier.
Initializes a graph using the given adjacency structure, and adjacency information for
a single node is stored in data structures created via the provided supplier.