create adjacency matrix from edge list java