def directed_adjacency_matrix(filename): with open(filename, 'r') as file: data = file.read() adj_matrix = parse_matrix(data) return Graph.from_adjacency_matrix(adj_matrix, is_directed=True)
def adjacency_matrix(filename): with open(filename, 'r') as file: data = file.read() adj_matrix = parse_matrix(data) return Graph.from_adjacency_matrix(adj_matrix)