auto currentSeed = unpredictableSeed(); static if(vdebug){write("UT: vT, remove. "); writeln("seed: ", currentSeed);} rndGenInUse.seed(currentSeed); //initialize the random generator auto uS = uniform(allowedArraySize,testedSize, rndGenInUse); VEBtree vT = new VEBtree(uS); size_t n; uint[allowedArraySize] insertedVals; while(n < allowedArraySize) { auto valToInsert = uniform(0U, uS, rndGenInUse); if(vT.insert(valToInsert)) { insertedVals[n] = valToInsert; n++; } } assert(vT._elementCount == insertedVals.length); foreach(size_t i; insertedVals) assert(vT.remove(i)); assert(vT.length == 0);
this method is used to remove elements from the tree. not existing values will be ignored.