1
votes

What is the best time order way for finding common edges of two graphs with equal number of nodes in matlab? I have both edges list and adjacency matrix and graph is sparse. Thanks

1

1 Answers

1
votes

For the edge list use:

commonEdges = intersect(edgesA, edgesB, 'rows')

For the adjacency matrix use:

commonAdjacency = adjacencyA & adjacencyB;