Changeset 530295 in git


Ignore:
Timestamp:
Jan 5, 2012, 5:52:39 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0e6668ef96c23537076f15491667b780427d0f91
Parents:
88408d0be2fdcd560bb0eceb25b88db10bf0c817
git-author:
Martin Lee <martinlee84@web.de>2012-01-05 17:52:39+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-04-04 14:42:25+02:00
Message:
chg: more changes to replace polynomial factorization over integer with new algorithm
Location:
factory
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_factor.cc

    r88408d0 r530295  
    648648      {
    649649        CFList factors;
    650         factors= ratSqrfFactorize (fz, Variable (1));
     650        factors= ratSqrfFactorize (fz);
    651651        for (CFListIterator i= factors; i.hasItem(); i++)
    652652          F.append (CFFactor (i.getItem(), 1));
    653653      }
    654654      else
    655         F = ratFactorize (fz, Variable (1));
     655        F = ratFactorize (fz);
    656656      Off (SW_RATIONAL);
    657657      #else
  • factory/facBivar.h

    r88408d0 r530295  
    4242inline
    4343CFList
    44 ratBiSqrfFactorize (const CanonicalForm & G, ///< [in] a bivariate poly
    45                     const Variable& v        ///< [in] algebraic variable
     44ratBiSqrfFactorize (const CanonicalForm & G,        ///< [in] a bivariate poly
     45                    const Variable& v= Variable (1) ///< [in] algebraic variable
    4646                   )
    4747{
     
    5252  F /= (contentX*contentY);
    5353  CFFList contentXFactors, contentYFactors;
    54   contentXFactors= factorize (contentX, v);
    55   contentYFactors= factorize (contentY, v);
     54  if (v.level() != 1)
     55  {
     56    contentXFactors= factorize (contentX, v);
     57    contentYFactors= factorize (contentY, v);
     58  }
     59  else
     60  {
     61    contentXFactors= factorize (contentX);
     62    contentYFactors= factorize (contentY);
     63  }
    5664  if (contentXFactors.getFirst().factor().inCoeffDomain())
    5765    contentXFactors.removeFirst();
     
    96104inline
    97105CFFList
    98 ratBiFactorize (const CanonicalForm & G, ///< [in] a bivariate poly
    99                 const Variable& v,      ///< [in] algebraic variable
    100                 bool substCheck= true    ///< [in] enables substitute check
     106ratBiFactorize (const CanonicalForm & G,         ///< [in] a bivariate poly
     107                const Variable& v= Variable (1), ///< [in] algebraic variable
     108                bool substCheck= true        ///< [in] enables substitute check
    101109               )
    102110{
     
    150158  F /= (contentX*contentY);
    151159  CFFList contentXFactors, contentYFactors;
    152   contentXFactors= factorize (contentX, v);
    153   contentYFactors= factorize (contentY, v);
     160  if (v.level() != 1)
     161  {
     162    contentXFactors= factorize (contentX, v);
     163    contentYFactors= factorize (contentY, v);
     164  }
     165  else
     166  {
     167    contentXFactors= factorize (contentX);
     168    contentYFactors= factorize (contentY);
     169  }
    154170  if (contentXFactors.getFirst().factor().inCoeffDomain())
    155171    contentXFactors.removeFirst();
  • factory/facFactorize.h

    r88408d0 r530295  
    3636inline
    3737CFList
    38 ratSqrfFactorize (const CanonicalForm & G,       ///<[in] a multivariate poly
    39                   const Variable& v              ///<[in] algebraic variable
     38ratSqrfFactorize (const CanonicalForm & G,        ///<[in] a multivariate poly
     39                  const Variable& v= Variable (1) ///<[in] algebraic variable
    4040                 )
    4141{
     
    6060inline
    6161CFFList
    62 ratFactorize (const CanonicalForm& G,        ///<[in] a multivariate poly
    63               const Variable& v,            ///<[in] algebraic variable
    64               bool substCheck= true          ///<[in] enables substitute check
     62ratFactorize (const CanonicalForm& G,          ///<[in] a multivariate poly
     63              const Variable& v= Variable (1), ///<[in] algebraic variable
     64              bool substCheck= true            ///<[in] enables substitute check
    6565             )
    6666{
Note: See TracChangeset for help on using the changeset viewer.