tdebatty / spark-knn-graphs

Spark algorithms for building k-nn graphs
MIT License
41 stars 15 forks source link

Does JabeJa assumes same node instance in Main node and NeigbourList? #18

Open Ishitori opened 1 year ago

Ishitori commented 1 year ago

I have a huge graph which I would like to partition. I manually create RDD with Node and NeigbourList, but instances of the object while have same id field are different.

I have tried to analyze your code, and I am worried that during the swap procedure you are updating the color of both nodes from left hand side (main node), but you don't update anything in NeigbourList. That means that when the degree index is rebuilt, the old color is used from NeigbourList.

Am I correct? Do I absolutely have to share pointers to the same node instances between left hand side nodes and nodes in NeigbourList?