Add the IndexedVector and Sample withReplacement