package commons.math.formulas;
public class TFIDFLog implements Formula
{

/**
 * Implements a term weighting formula: Args: tf, idf, corpusSize
 */
public double calculate (double... arg)
{
   double tf = arg[0];
   double idf = arg[1] + 1D; // log(1) == 0 therefore we shift by one
//   double l = NumUtl.logn(idf, Math.E);
   double l = Math.log(idf);
   return tf * l;
}
}
