merged adjacency matrix