Replace set with vector in computeIndices