addAndEnsureDiversity
fun addAndEnsureDiversity(newNode: Int, newScore: Float, nodeId: Int, scorer: UpdateableRandomVectorScorer)
In addition to .addOutOfOrder, this function will also remove the least-diverse node if the node array is full after insertion
In multi-threading environment, this method need to be locked as it will be called by multiple threads while other add method is only supposed to be called by one thread.
Parameters
nodeId
node Id of the owner of this NeighbourArray