public final class RationalReconstruction extends Object
Modifier and Type | Method and Description |
---|---|
static BigInteger[] |
reconstruct(BigInteger n,
BigInteger modulus,
BigInteger numeratorBound,
BigInteger denominatorBound)
Performs a rational number reconstruction.
|
static long[] |
reconstruct(long n,
long modulus,
long numeratorBound,
long denominatorBound)
Performs a rational number reconstruction.
|
static <Poly extends IUnivariatePolynomial<Poly>> |
reconstruct(Poly n,
Poly modulus,
int numeratorBound,
int denominatorBound)
Performs a rational number reconstruction.
|
static BigInteger[] |
reconstructFarey(BigInteger n,
BigInteger modulus)
Performs a rational number reconstruction via Farey images, that is reconstructuction with bound B = sqrt(N/2 -
1/2)
|
static BigInteger[] |
reconstructFareyErrorTolerant(BigInteger n,
BigInteger modulus)
Performs a error tolerant rational number reconstruction as described in Algorithm 5 of Janko Boehm, Wolfram
Decker, Claus Fieker, Gerhard Pfister, "The use of Bad Primes in Rational Reconstruction",
https://arxiv.org/abs/1207.1651v2
|
public static long[] reconstruct(long n, long modulus, long numeratorBound, long denominatorBound)
null
is returned.n
- num * den^(-1) mod modulusmodulus
- the modulusnumeratorBound
- numerator bounddenominatorBound
- denominator boundpublic static BigInteger[] reconstruct(BigInteger n, BigInteger modulus, BigInteger numeratorBound, BigInteger denominatorBound)
null
is returned.public static BigInteger[] reconstructFarey(BigInteger n, BigInteger modulus)
public static BigInteger[] reconstructFareyErrorTolerant(BigInteger n, BigInteger modulus)
public static <Poly extends IUnivariatePolynomial<Poly>> Poly[] reconstruct(Poly n, Poly modulus, int numeratorBound, int denominatorBound)
null
is returned.n
- num * den^(-1) mod modulusmodulus
- the modulusnumeratorBound
- numerator bounddenominatorBound
- denominator boundCopyright © 2018. All rights reserved.