Changeset 34e062 in git for factory/facFqBivar.cc


Ignore:
Timestamp:
Jan 9, 2012, 1:59:20 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
Children:
a541144c391fb958d4c9ea1ac173dc1c117fb51f
Parents:
6fd83c451371ff612e9c1323bb1f472466b5933c
git-author:
Martin Lee <martinlee84@web.de>2012-01-09 13:59:20+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-10 14:16:44+01:00
Message:
chg: added functions to compute better lifting precisions
     based on the shape of the Newton polygon
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    r6fd83c4 r34e062  
    780780}
    781781
     782int*
     783getCombinations (int * rightSide, int sizeOfRightSide, int& sizeOfOutput,
     784                 int degreeLC)
     785{
     786  Variable x= Variable (1);
     787  int p= getCharacteristic();
     788  int d= getGFDegree();
     789  char cGFName= gf_name;
     790  setCharacteristic(0);
     791  CanonicalForm buf= 1;
     792  for (int i= 0; i < sizeOfRightSide; i++)
     793    buf *= (power (x, rightSide [i]) + 1);
     794
     795  int j= 0;
     796  for (CFIterator i= buf; i.hasTerms(); i++, j++)
     797  {
     798    if (i.exp() < degreeLC)
     799    {
     800      j++;
     801      break;
     802    }
     803  }
     804
     805  ASSERT ( j > 1, "j > 1 expected" );
     806
     807  int* result = new int  [j - 1];
     808  sizeOfOutput= j - 1;
     809
     810  int i= 0;
     811  for (CFIterator m = buf; i < j - 1; i++, m++)
     812    result [i]= m.exp();
     813
     814  if (d > 1)
     815    setCharacteristic (p, d, cGFName);
     816  else
     817    setCharacteristic (p);
     818  return result;
     819}
     820
     821int *
     822getLiftPrecisions (const CanonicalForm& F, int& sizeOfOutput, int degreeLC)
     823{
     824  int sizeOfNewtonPoly;
     825  int ** newtonPolyg= newtonPolygon (F, sizeOfNewtonPoly);
     826  int sizeOfRightSide;
     827  int * rightSide= getRightSide(newtonPolyg, sizeOfNewtonPoly, sizeOfRightSide);
     828  int * result= getCombinations(rightSide, sizeOfRightSide, sizeOfOutput,
     829                                degreeLC);
     830  delete [] rightSide;
     831  for (int i= 0; i < sizeOfNewtonPoly; i++)
     832    delete [] newtonPolyg[i];
     833  delete [] newtonPolyg;
     834  return result;
     835}
     836
    782837CFList
    783838henselLiftAndEarly (CanonicalForm& A, bool& earlySuccess, CFList&
Note: See TracChangeset for help on using the changeset viewer.