@Override
	public double compute(double[] params) {
		double a = params[0];
		double b = params[1];
		switch (type) {
		case ADD:
			return a + b;
		case SUBTRACT:
			return a - b;
		case MULTIPLY:
			return a * b;
		case DIVIDE:
			return a / b;
		case POWER:
			return Math.pow(a, b);
		}
		return a;
	}