Changeset 8c1a84 in git


Ignore:
Timestamp:
Jun 21, 2011, 9:33:39 AM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
50a2aa95106a901b7b3b189d3724a19e186db0f7
Parents:
2d0f7d3bc1abfb71f9873d236dbbea3cf7a7860f
Message:
updated docu and header


git-svn-id: file:///usr/local/Singular/svn/trunk@14294 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
factory
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    r2d0f7d3 r8c1a84  
    88 * Algebra, Chapter 15" by J. von zur Gathen & J. Gerhard and "Factoring
    99 * multivariate polynomials over a finite field" by L. Bernardin.
     10 * Factor Recombination is described in "Factoring polynomials over global
     11 * fields" by K. Belabas, M. van Hoeij, J. Klueners, A. Steel
    1012 *
    11  * ABSTRACT: In contrast to biFactorizer() in facFqFactorice.cc we evaluate and
    12  * factorize the polynomial in both variables. So far factor recombination is
    13  * done naive!
    1413 *
    1514 * @author Martin Lee
  • factory/facFqBivar.h

    r2d0f7d3 r8c1a84  
    66 * This file provides functions for factorizing a bivariate polynomial over
    77 * \f$ F_{p} \f$ , \f$ F_{p}(\alpha ) \f$ or GF.
    8  *
    9  * ABSTRACT: In contrast to biFactorizer() in facFqFactorice.cc we evaluate and
    10  * factorize the polynomial in both variables. So far factor recombination is
    11  * done naive!
    128 *
    139 * @author Martin Lee
  • factory/facFqFactorize.cc

    r2d0f7d3 r8c1a84  
    88 *
    99 * ABSTRACT: "Efficient Multivariate Factorization over Finite Fields" by
    10  * L. Bernardin & M. Monagon.
     10 * L. Bernardin & M. Monagon. Precomputation of leading coefficients is
     11 * described in "Sparse Hensel lifting" by E. Kaltofen
    1112 *
    1213 * @author Martin Lee
     
    117118}
    118119
    119 static inline
    120120CanonicalForm myCompress (const CanonicalForm& F, CFMap& N)
    121121{
     
    865865}
    866866
    867 static inline
    868867CanonicalForm lcmContent (const CanonicalForm& A, CFList& contentAi)
    869868{
     
    12171216CFList
    12181217distributeContent (const CFList& L, const CFList* differentSecondVarFactors,
    1219                    int length, const CFList& factors
     1218                   int length
    12201219                  )
    12211220{
     
    12891288}
    12901289
    1291 static inline
    12921290CFList evaluateAtZero (const CanonicalForm& F)
    12931291{
     
    16061604  result.insert (N (F));
    16071605
    1608   result= distributeContent (result, differentSecondVarLCs, length, bufFactors);
     1606  result= distributeContent (result, differentSecondVarLCs, length);
    16091607
    16101608  if (!result.getFirst().inCoeffDomain())
  • factory/facFqFactorize.h

    r2d0f7d3 r8c1a84  
    66 * This file provides functions for factorizing a multivariate polynomial over
    77 * \f$ F_{p} \f$ , \f$ F_{p}(\alpha ) \f$ or GF.
    8  *
    9  * ABSTRACT: So far factor recombination is done naive!
    108 *
    119 * @author Martin Lee
     
    233231}
    234232
    235 /// naive factor recombination for bivariate factorization.
    236 /// Uses precomputed data to exclude combinations that are not possible.
    237 ///
    238 /// @return @a monicFactorRecombi returns a list of factors of F, that are
    239 ///         monic wrt Variable (1).
    240 /// @sa extFactorRecombination(), factorRecombination(), biFactorizer()
    241 CFList
    242 monicFactorRecombi (
    243                   const CFList& factors,    ///< [in] list of lifted factors
    244                                             ///< that are monic wrt Variable (1)
    245                   const CanonicalForm& F,   ///< [in] bivariate poly
    246                   const CanonicalForm& M,   ///< [in] Variable (2)^liftBound
    247                   const DegreePattern& degs ///< [in] degree pattern
    248                    );
    249 
    250 /// detects factors of @a F at stage @a deg of Hensel lifting.
    251 /// No combinations of more than one factor are tested. Lift bound and possible
    252 /// degree pattern are updated.
    253 ///
    254 /// @return @a earlyMonicFactorDetect returns a list of factors of F (possibly
    255 ///         incomplete) that are monic wrt Variable (1)
    256 /// @sa monicFactorRecombi(), earlyFactorDetection(), monicFactorDetect(),
    257 ///     biFactorizer()
    258 CFList
    259 earlyMonicFactorDetect (
    260            CanonicalForm& F,       ///< [in,out] poly to be factored, returns
    261                                    ///< poly divided by detected factors in case
    262                                    ///< of success
    263            CFList& factors,        ///< [in,out] list of factors lifted up to
    264                                    ///< @a deg, returns a list of factors
    265                                    ///< without detected factors
    266            int& adaptedLiftBound,  ///< [in,out] adapted lift bound
    267            DegreePattern& degs,    ///< [in,out] degree pattern, is updated
    268                                    ///< whenever we find a factor
    269            bool& success,          ///< [in,out] indicating success
    270            int deg,                ///< [in] stage of Hensel lifting
    271            const int bound         ///< [in] degree (A, 2) + 1 +
    272                                    ///< degree (LC (A, 1), 2), where A is the
    273                                    ///< multivariate polynomial corresponding to
    274                                    ///< F.
    275                        );
    276 
    277 /// Bivariate factorization. In contrast to biFactorize() the factors returned
    278 /// are monic wrt Variable (1), if @a F is not irreducible. And no factorization
    279 /// wrt Variable (2) are performed. However,
    280 ///
    281 /// @return @a biFactorizer returns a list of factors that are monic wrt
    282 ///         Variable (1), if @a F is irreducible @a F is returned
    283 /// @sa multiFactorize(), biFactorize()
    284 CFList biFactorizer (const CanonicalForm& F,   ///< [in] a bivariate poly
    285                      const Variable& alpha,    ///< [in] algebraic variable
    286                      CanonicalForm& bivarEval, ///< [in,out] a valid evaluation
    287                                                ///< point
    288                      int& liftBound            ///< [in,out] lift bound, may be
    289                                                ///< adapted during Hensel
    290                                                ///< lifting
    291                     );
    292 
    293233/// Naive factor recombination for multivariate factorization over an extension
    294234/// of the initial field. No precomputed is used to exclude combinations.
     
    407347/// evaluation point search for multivariate factorization,
    408348/// looks for a (F.level() - 1)-tuple such that the resulting univariate
    409 /// polynomial has main variable F.mvar(), is squarefree and its degree
     349/// polynomial has main variable Variable (1), is squarefree and its degree
    410350/// coincides with degree(F) and the bivariate one is primitive wrt.
    411 /// Variable(1), fails if there are no valid evaluation points, eval contains
    412 /// the intermediate evaluated polynomials.
     351/// Variable(1), and successively evaluated polynomials have the same degree in
     352/// their main variable as F has, fails if there are no valid evaluation points,
     353/// eval contains the intermediate evaluated polynomials.
    413354///
    414355/// @return @a evalPoints returns an evaluation point, which is valid if and
     
    460401             );
    461402
     403/// compute the LCM of the contents of @a A wrt to each variable occuring in @a
     404/// A.
     405///
     406/// @return @a lcmContent returns the LCM of the contents of @a A wrt to each
     407///         variable occuring in @a A.
     408CanonicalForm
     409lcmContent (const CanonicalForm& A, ///< [in] a compressed multivariate poly
     410            CFList& contentAi       ///< [in,out] an empty list, returns a list
     411                                    ///< of the contents of @a A wrt to each
     412                                    ///< variable occuring in @a A starting from
     413                                    ///< @a A.mvar().
     414           );
     415
     416/// compress a polynomial s.t. \f$ deg_{x_{i}} (F) >= deg_{x_{i+1}} (F) \f$ and
     417/// no gaps between the variables occur
     418///
     419/// @return a compressed poly with the above properties
     420CanonicalForm myCompress (const CanonicalForm& F, ///< [in] a poly
     421                          CFMap& N                ///< [in,out] a map to
     422                                                  ///< decompress
     423                         );
     424
     425/// evaluate a poly A with main variable at level 1 at an evaluation point in
     426/// K^(n-1) wrt different second variables. If this evaluation is valid (see
     427/// evalPoints) then Aeval contains A successively evaluated at this point,
     428/// otherwise this entry is empty
     429void
     430evaluationWRTDifferentSecondVars (
     431                    CFList*& Aeval,          ///<[in,out] an array of length n-2
     432                                             ///< if variable at level i > 2
     433                                             ///< admits a valid evaluation
     434                                             ///< this entry contains A
     435                                             ///< successively evaluated at this
     436                                             ///< point otherwise an empty list
     437                    const CFList& evaluation,///<[in] a valid evaluation point
     438                                             ///< for main variable at level 1
     439                                             ///< and second variable at level 2
     440                    const CanonicalForm& A   ///<[in] some poly
     441                                 );
     442
     443/// evaluate F successively n-2 at 0
     444///
     445/// @return returns a list of successive evaluations of F, ending with F
     446CFList evaluateAtZero (const CanonicalForm& F ///< [in] some poly
     447                      );
     448
     449/// divides factors by their content wrt. Variable(1) and checks if these polys
     450/// divide F
     451///
     452/// @return returns factors of F
     453CFList recoverFactors (const CanonicalForm& F, ///< [in] some poly F
     454                       const CFList& factors   ///< [in] some list of
     455                                               ///< factor candidates
     456                      );
     457
     458/// refine a bivariate factorization of A with l factors to one with
     459/// minFactorsLength
     460void
     461refineBiFactors (const CanonicalForm& A,  ///< [in] some poly
     462                 CFList& biFactors,       ///< [in,out] list of bivariate to be
     463                                          ///< refined, returns refined factors
     464                 CFList* const& factors,  ///< [in] list of bivariate
     465                                          ///< factorizations of A wrt different
     466                                          ///< second variables
     467                 const CFList& evaluation,///< [in] the evaluation point
     468                 int minFactorsLength     ///< [in] the minimal number of factors
     469                );
     470
     471/// plug in evalPoint for y in a list of polys
     472///
     473/// @return returns a list of the evaluated polys, these evaluated polys are
     474/// made monic
     475CFList
     476buildUniFactors (const CFList& biFactors,       ///< [in] a list of polys
     477                 const CanonicalForm& evalPoint,///< [in] some evaluation point
     478                 const Variable& y              ///< [in] some variable
     479                );
     480
     481/// extract leading coefficients wrt Variable(1) from bivariate factors obtained
     482/// from factorizations of A wrt different second variables
     483void
     484getLeadingCoeffs (const CanonicalForm& A,  ///< [in] some poly
     485                  CFList*& Aeval,          ///< [in,out] array of bivariate
     486                                           ///< factors, returns the leading
     487                                           ///< coefficients of these factors
     488                  const CFList& uniFactors,///< [in] univariate factors of A
     489                  const CFList& evaluation ///< [in] evaluation point
     490                 );
     491
     492/// normalize precomputed leading coefficients such that leading coefficients
     493/// evaluated at 0 in K^(n-2) equal the leading coeffs wrt Variable(1) of
     494/// bivariate factors
     495void
     496prepareLeadingCoeffs (CFList*& LCs,               ///<[in,out]
     497                      int n,                      ///<[in] level of poly to be
     498                                                  ///< factored
     499                      const CFList& leadingCoeffs,///<[in] precomputed leading
     500                                                  ///< coeffs
     501                      const CFList& biFactors     ///<[in] bivariate factors
     502                     );
     503
     504/// obtain factors of F by reconstructing their leading coeffs
     505///
     506/// @return returns the reconstructed factors
     507/// @sa factorRecombination()
     508CFList
     509leadingCoeffReconstruction (const CanonicalForm& F,///<[in] poly to be factored
     510                            const CFList& factors, ///<[in] factors of f monic
     511                                                   ///< wrt Variable (1)
     512                            const CFList& M        ///<[in] a list of powers of
     513                                                   ///< Variables
     514                           );
     515
     516/// distribute content
     517///
     518/// @return returns a list result of polys such that prod (result)= prod (L)
     519/// but the first entry of L may be (partially) factorized and these factors
     520/// are distributed onto other entries in L
     521CFList
     522distributeContent (
     523          const CFList& L,                        ///<[in] list of polys, first
     524                                                  ///< entry the content to be
     525                                                  ///< distributed
     526          const CFList* differentSecondVarFactors,///<[in] factorization wrt
     527                                                  ///< different second vars
     528          int length                              ///<[in] length of
     529                                                  ///<differentSecondVarFactors
     530                  );
     531
     532/// gcd free basis of two lists of factors
     533void
     534gcdFreeBasis (CFFList& factors1, ///< [in,out] list of factors, returns gcd free
     535                                 ///< factors
     536              CFFList& factors2  ///< [in,out] list of factors, returns gcd free
     537                                 ///< factors
     538             );
     539
    462540#endif
    463541/* FAC_FQ_FACTORIZE_H */
Note: See TracChangeset for help on using the changeset viewer.