 Instead of the resampling done in classic MCL, the KLD–sampling algorithm draws particles from the previous, weighted, particle set and applies the motion and sensor updates before placing the particle into its bin.The algorithm keeps track of the number of non-empty bins, formula_46.If a particle is inserted in a previously empty bin, the value of formula_40 is recalculated, which increases mostly linear in formula_46.