@Override
  @SuppressWarnings("unchecked")
  public void initialize() {
    super.initialize();

    divide =
        (BinaryInplace1Op)
            Inplaces.binary1(ops(), DivideHandleZeroOp1.class, RealType.class, RealType.class);

    map =
        (BinaryInplace1Op)
            Inplaces.binary1(
                ops(),
                MapBinaryInplace1s.IIAndII.class,
                IterableInterval.class,
                IterableInterval.class,
                divide);
  }
예제 #2
0
 @Before
 public void init() {
   final long[] dims = new long[] {10, 10};
   in = generateByteArrayTestImg(false, dims);
   out = generateByteArrayTestImg(false, dims);
   numIterations = 10;
   computerOp = Computers.unary(ops, MapOp.class, out, in, new AddOneFunctional());
   inplaceOp = Inplaces.unary(ops, MapOp.class, in, new AddOneInplace());
 }