コード例 #1
0
ファイル: Relation.cs プロジェクト: be4/GNFS
        public Relation(GNFS gnfs, int a, uint b)
            : this()
        {
            A = a;
            B = b;

            AlgebraicNorm = Normal.Algebraic(A, B, gnfs.CurrentPolynomial);        // b^deg * f( a/b )
            RationalNorm  = Normal.Rational(A, B, gnfs.PolynomialBase);            // a + bm

            AlgebraicQuotient = BigInteger.Abs(AlgebraicNorm);
            RationalQuotient  = BigInteger.Abs(RationalNorm);

            if (AlgebraicNorm.Sign == -1)
            {
                AlgebraicFactorization.Add(BigInteger.MinusOne);
            }

            if (RationalNorm.Sign == -1)
            {
                RationalFactorization.Add(BigInteger.MinusOne);
            }
        }