예제 #1
0
 private void doCase(double r1, double i1, double r2, double i2) {
   input1.setComplexNumber(r1, i1);
   input2.setComplexNumber(r2, i2);
   op.compute(input1, input2, output);
   assertEquals(r1 - r2, output.getRealDouble(), 0);
   assertEquals(i1 - i2, output.getImaginaryDouble(), 0);
 }
예제 #2
0
 @Override
 public O compute(I z, O output) {
   mulFunc.compute(z, I, IZ);
   mulFunc.compute(z, MINUS_I, minusIZ);
   expFunc.compute(IZ, expIZ);
   expFunc.compute(minusIZ, expMinusIZ);
   subFunc.compute(expIZ, expMinusIZ, diff);
   divFunc.compute(diff, TWO_I, output);
   return output;
 }