예제 #1
0
 public GNFS()
 {
     PrimeFactorBase               = new FactorBase();
     PolynomialCollection          = new List <IPolynomial>();
     RationalFactorPairCollection  = new FactorPairCollection();
     AlgebraicFactorPairCollection = new FactorPairCollection();
     QuadraticFactorPairCollection = new FactorPairCollection();
     CurrentRelationsProgress      = new PolyRelationsSieveProgress();
 }
예제 #2
0
        public void CaclulatePrimeFactorBaseBounds(BigInteger bound)
        {
            PrimeFactorBase = new FactorBase();

            PrimeFactorBase.RationalFactorBaseMax  = bound;
            PrimeFactorBase.AlgebraicFactorBaseMax = (PrimeFactorBase.RationalFactorBaseMax) * 3;

            PrimeFactorBase.QuadraticBaseCount = CalculateQuadraticBaseSize(PolynomialDegree);

            PrimeFactorBase.QuadraticFactorBaseMin = PrimeFactorBase.AlgebraicFactorBaseMax + 20;
            PrimeFactorBase.QuadraticFactorBaseMax = PrimeFactory.GetApproximateValueFromIndex((UInt64)(PrimeFactorBase.QuadraticFactorBaseMin + PrimeFactorBase.QuadraticBaseCount));

            Serialization.Save.All(this);
            LogMessage("Saved prime factor base bounds.");
        }