Added from_adjacency method