finish calc_f, calc_idf, calc_n functions
finish calc_entropy;