has anyone ever done or seen something like this?
I have two disconnected graphs of the same size with the same nodes but different edges. They may contain connected components. I want to compare one connected component "a" of graph 1 to one connected component "b" of graph 2. But I dont only want to calculate the graph edit distance for these two connected components which gives me the cost of transforming "a" to "b". In additon to that, I need to consider the spatial distance between the two connected components in their graph to also have the cost for the spatial distance between them. So transformation from "a" to "b" means to me bringing it into the same "shape" with the exact same edges AND bringing it to the same position as b is in its graph.
Example:
Graph 1 with connected component "a"
Graph 2 with connected component "b"
So now I need to add two edges two transform "a" to "b". But I also need to "move" "a" 4 steps to the right and one step down.
Are there any known algorithms for this or any approved ways to store the position of connected components and then compare it?
Thank you my dears!
My first idea was to just use some kind of edit distance and leave "a" after transformation at its initial position. Then identify the node which is furthest down and then furthest left and identify the corresponding same one in "b", then calculate the euclididan distance and give some weight to that. The exact weight is currently not in the focus.