Changeset 8267b8 in git


Ignore:
Timestamp:
Aug 8, 2012, 1:53:56 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
772056356a290f168fe23a574925585d4d7142bc
Parents:
7b5cb2e2df585c1f09f3b55dd033e016a8aed7b6
git-author:
Martin Lee <martinlee84@web.de>2012-08-08 13:53:56+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-04 18:01:16+02:00
Message:
chg: added a new function to recover factors
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqFactorize.cc

    r7b5cb2 r8267b8  
    20802080}
    20812081
     2082CFList recoverFactors (CanonicalForm& F, const CFList& factors, int* index)
     2083{
     2084  CFList result;
     2085  CanonicalForm tmp, tmp2;
     2086  CanonicalForm G= F;
     2087  int j= 0;
     2088  for (CFListIterator i= factors; i.hasItem(); i++, j++)
     2089  {
     2090    if (i.getItem().isZero())
     2091    {
     2092      index[j]= 0;
     2093      continue;
     2094    }
     2095    tmp= i.getItem();
     2096    if (fdivides (tmp, G, tmp2))
     2097    {
     2098      G= tmp2;
     2099      tmp /=content (tmp, 1);
     2100      result.append (tmp);
     2101      index[j]= 1;
     2102    }
     2103    else
     2104      index[j]= 0;
     2105  }
     2106  F= G;
     2107  return result;
     2108}
     2109
    20822110CFList
    20832111extNonMonicFactorRecombination (const CFList& factors, const CanonicalForm& F,
  • factory/facFqFactorize.h

    r7b5cb2 r8267b8  
    569569                       const CFList& factors,   ///< [in] some list of
    570570                                                ///< factor candidates
    571                        const CFList& evaluation
     571                       const CFList& evaluation ///< [in] evaluation point
     572                      );
     573
     574/// checks if factors divide F, if so F is divided by this factor and the factor
     575/// is divided by its content wrt. Variable(1) and the entry in index at the
     576/// position of the factor is set to 1, otherwise the entry in index is set to 0
     577///
     578/// @return returns factors of F
     579CFList recoverFactors (CanonicalForm& F,     ///< [in,out] some poly F
     580                       const CFList& factors,///< [in] some list of
     581                                             ///< factor candidates
     582                       int* index            ///< [in] position of real factors
    572583                      );
    573584
Note: See TracChangeset for help on using the changeset viewer.