Add class for handling the frequency table in a sparse manner.