class PolynomialExpansionMapper extends SISOMapper {

	@VisibleForTesting
	static int getPolySize(int num, int degree) {
		if (num == 0) {
			return 1;
		}
		if (num == 1 || degree == 1) {
			return num + degree;
		}
		if (degree > num) {
			return getPolySize(degree, num);
		}
		long res = 1;
		int i = num + 1;
		int j;
		if (num + degree < CONSTANT) {
			for (j = 1; j <= degree; ++j) {
				res = res * i / j;
				++i;
			}
		} else {
			int depth;
			for (j = 1; j <= degree; ++j) {
				depth = ArithmeticUtils.gcd(i, j);
				res = ArithmeticUtils.mulAndCheck(res / (j / depth), i / depth);
				++i;
			}
		}
		if (res > Integer.MAX_VALUE) {
			throw new IllegalArgumentException("The expended polynomial size is too large.");
		}
		return (int) res;

	}

	public  PolynomialExpansionMapper(TableSchema dataSchema, Params params);

}