
org.mydotey.quantile.value.IntCalculator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quantile-estimator Show documentation
Show all versions of quantile-estimator Show documentation
quantile algorithms' implementations for stream data
The newest version!
package org.mydotey.quantile.value;
/**
* @author koqizhao
*
* Apr 1, 2018
*/
public class IntCalculator implements Calculator {
public static final IntCalculator DEFAULT = new IntCalculator();
@Override
public Integer add(Integer t, Integer t2) {
return t + t2;
}
@Override
public Integer subtract(Integer t, Integer t2) {
return t - t2;
}
@Override
public Integer multiply(Integer t, double t2) {
return (int) (t * t2);
}
@Override
public Integer divide(Integer t, double t2) {
return (int) (t / t2);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy