26272829303132
*/ public class FloatParser implements FieldParser<FloatType> { @Override public FloatType getValue(String text) { return new FloatType(Float.valueOf(text)); }
49505152535455
* */ public final static class IDFfunc implements Functional<FloatType, FloatType> { @Override public FloatType reduce(FloatType a, FloatType b) { return new FloatType(a.get() * (float) Math.log10(numDocs / b.get())); }
90919293949596
public void configure(JobConf job) throws Exception { } @Override public FloatType reduce(IntType a, FloatType b) { return new FloatType((float) a.get() + b.get()); }
122123124125126127128
public void configure(JobConf job) throws Exception { } @Override public FloatType reduce(IntType a, FloatType b) { return new FloatType((float) a.get() / b.get()); }
156157158159160161162
public void configure(JobConf job) throws Exception { } @Override public FloatType reduce(FloatType a, FloatType b) { return new FloatType(b.get() + 1); }
45464748495051
} @Override public FloatType reduce(IntType a, FloatType b) { return new FloatType(a.get() + b.get()); }
72737475767778