Changeset 530295 in git for factory/facBivar.h


Ignore:
Timestamp:
Jan 5, 2012, 5:52:39 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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();
Note: See TracChangeset for help on using the changeset viewer.