as_adjacency_matrix implemented