I've run into a problem where I do something like:
for node in nodesNotInTree {
var closestNode = tree.nearest(node, 1)[0][0];
tree.remove(closestNode);
}
This is an attempt to match every node in nodesNotInTree to a unique node in tree. However, for some reason, this method of removal isn't working properly. Instead, closestNode is the closest node from the original tree, instead what it should be: of the closest node in the tree that hasn't yet been accessed.
Hope that explained my problem clearly. Am I doing things in the wrong order?
I've run into a problem where I do something like:
This is an attempt to match every node in
nodesNotInTreeto a unique node intree. However, for some reason, this method of removal isn't working properly. Instead,closestNodeis the closest node from the original tree, instead what it should be: of the closest node in the tree that hasn't yet been accessed.Hope that explained my problem clearly. Am I doing things in the wrong order?