@Override public void compute(final T input, final Unsigned128BitType output) { output.set(input.getBigInteger()); }
@Override public void compute(T in, T out) { BigInteger inverted = minMax.subtract(in.getBigInteger()); if( inverted.compareTo(minValue(out).getBigInteger()) <= 0) out.set(minValue(out)); else if(inverted.compareTo(maxValue(out).getBigInteger()) >= 0) out.set(maxValue(out)); else out.setBigInteger(inverted); } });
@Override public void compute(final IterableInterval<T> input, final IterableInterval<T> output) { if (mapper == null) { final BigInteger minValue = min == null ? (minValue(input.firstElement())).getBigInteger() : min.getBigInteger(); final BigInteger maxValue = max == null ? (maxValue(input.firstElement())).getBigInteger() : max.getBigInteger(); final BigInteger minMax = minValue.add(maxValue); mapper = Computers.unary(ops(), Ops.Map.class, output, input, new AbstractUnaryComputerOp<T, T>() { @Override public void compute(T in, T out) { BigInteger inverted = minMax.subtract(in.getBigInteger()); if( inverted.compareTo(minValue(out).getBigInteger()) <= 0) out.set(minValue(out)); else if(inverted.compareTo(maxValue(out).getBigInteger()) >= 0) out.set(maxValue(out)); else out.setBigInteger(inverted); } }); } mapper.compute(input, output); }
.getBigInteger(); final BigInteger maxOut = InvertIIInteger.maxValue(out.firstElement()) .getBigInteger(); BigInteger minMax = BigInteger.ZERO; minMax = InvertIIInteger.minValue(in.firstElement()).getBigInteger().add( InvertIIInteger.maxValue(in.firstElement()).getBigInteger()); minMax = min.getBigInteger().add(max.getBigInteger()); outAccess.setPosition(inAccess); final T outVal = outAccess.get(); final BigInteger bigIn = inVal.getBigInteger(); final BigInteger bigOut = outVal.getBigInteger(); final BigInteger calcOut = minMax.subtract(bigIn); if (calcOut.compareTo(minOut) <= 0) {