Class BarrettReduction
java.lang.Object
dk.jonaslindstrom.ruffini.common.algorithms.BarrettReduction
- All Implemented Interfaces:
java.util.function.Function<BigInteger,
,BigInteger> java.util.function.UnaryOperator<BigInteger>
public class BarrettReduction
extends Object
implements java.util.function.UnaryOperator<BigInteger>
Barrett reduction is a fast method for computing x mod m for large x and m.
The algorithm is described in Wikipedia.
-
Constructor Details
-
BarrettReduction
-
-
Method Details
-
apply
- Specified by:
apply
in interfacejava.util.function.Function<BigInteger,
BigInteger>
-