Closed freemo closed 7 years ago
After further investigation I've decided this can't really be solved the way we planned. All current edges will be dropped and recreated. If an edge is to be preserved then remove and add forms of these methods can be called instead.
The reason for this is any solution that preserves existing edges needs to do one of two things:
1) Create an in-memory collection to hold all the edges to be deleted or preserved calculated by iterating through the existing edges.
2) the graph will have to be edited in place with edges flagged for deletion.
Since we want to keep the code generic enough to be capable of operating on large graphs that can't fit in memory #1 can be ruled out as a viable option. Option #2 would be slow so if we decide to implement it down the road it would have to be turned on/off through an annotation option. We would also need to redesign the system to add some sort of configurable prefix to use so as to avoid namespace clashes with user's existing properties. So if this is implemented in the future it would be as a new feature and not a bug fix anyway.
In conclusion, it's a feature not a bug!
When a set operation is performed on an adjacency it always drops all existing edges then recreates them. However if the vertex in a set operation are already adjacencies those edges should be preserved.