Changeset 5335ba in git


Ignore:
Timestamp:
Jan 25, 2012, 10:29:16 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
ac3fccaf5d3d10d4756431ed2ec3846d0a5852cc
Parents:
e5fc00c615e47e7757b8c95660e3a8ac06ffdef0
git-author:
Martin Lee <martinlee84@web.de>2012-01-25 22:29:16+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-10 14:16:43+01:00
Message:
chg: computation of log derivative now expects truncated input
Location:
factory
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    re5fc00c r5335ba  
    14031403  CFArray buf;
    14041404  CFListIterator j;
     1405  CanonicalForm truncF;
     1406  Variable y= F.mvar();
    14051407  while (l <= liftBound)
    14061408  {
     
    14221424    j++;
    14231425
     1426    truncF= mod (F, power (y, l));
    14241427    for (int i= 0; i < factors.length() - 1; i++, j++)
    14251428    {
    14261429      if (!wasInBounds)
    1427         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ[i]);
     1430        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ[i]);
    14281431      else
    1429         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i], bufQ[i]);
     1432        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
     1433                                     bufQ[i]);
    14301434    }
    14311435
     
    15191523  Variable y= F.mvar();
    15201524  Variable x= Variable (1);
    1521   CanonicalForm powX, imBasis;
     1525  CanonicalForm powX, imBasis, truncF;
    15221526  CFMatrix Mat, C;
    15231527  CFArray buf;
     
    15661570    j++;
    15671571
     1572    truncF= mod (F, power (y, l));
    15681573    for (int i= 0; i < factors.length() - 1; i++, j++)
    15691574    {
    15701575      if (!wasInBounds)
    1571         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ[i]);
     1576        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ[i]);
    15721577      else
    1573         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i], bufQ[i]);
     1578        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
     1579                                     bufQ[i]);
    15741580    }
    15751581
     
    16831689  CFArray buf;
    16841690  CFMatrix C;
     1691  Variable y= F.mvar();
     1692  CanonicalForm truncF;
    16851693  while (l <= liftBound)
    16861694  {
     
    17021710    j++;
    17031711
     1712    truncF= mod (F, power (y,l));
    17041713    for (int i= 0; i < factors.length() - 1; i++, j++)
    17051714    {
    17061715      if (l == (minBound+1)*2)
    17071716      {
    1708         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ[i]);
     1717        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ[i]);
    17091718      }
    17101719      else
    17111720      {
    1712         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i],
     1721        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
    17131722                                     bufQ[i]
    17141723                                    );
     
    17971806  CFArray buf;
    17981807  mat_zz_p* NTLC, NTLK;
     1808  Variable y= F.mvar();
     1809  CanonicalForm truncF;
    17991810  while (l <= liftBound)
    18001811  {
     
    18161827    j++;
    18171828
     1829    truncF= mod (F, power (y,l));
    18181830    for (int i= 0; i < factors.length() - 1; i++, j++)
    18191831    {
    18201832      if (l == (minBound+1)*2)
    18211833      {
    1822         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ[i]);
     1834        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ[i]);
    18231835      }
    18241836      else
    18251837      {
    1826         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i],
     1838        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
    18271839                                     bufQ[i]
    18281840                                    );
     
    19161928  CFArray buf;
    19171929  mat_zz_p* NTLC, NTLK;
     1930  Variable y= F.mvar();
     1931  CanonicalForm truncF;
    19181932  while (l <= precision)
    19191933  {
    19201934    j= factors;
     1935    truncF= mod (F, power (y,l));
    19211936    if (useOldQs)
    19221937    {
    19231938      for (int i= 0; i < factors.length(); i++, j++)
    1924         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL2, bufQ[i],
     1939        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL2, bufQ[i],
    19251940                                     bufQ[i]
    19261941                                    );
     
    19291944    {
    19301945      for (int i= 0; i < factors.length(); i++, j++)
    1931         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     1946        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    19321947    }
    19331948    useOldQs= true;
     
    20432058  mat_zz_pE* NTLC, NTLK;
    20442059  CFArray buf;
     2060  Variable y= F.mvar();
     2061  CanonicalForm truncF;
    20452062  while (l <= precision)
    20462063  {
    20472064    j= factors;
     2065    truncF= mod (F, power (y,l));
    20482066    if (useOldQs)
    20492067    {
    20502068      for (int i= 0; i < factors.length(); i++, j++)
    2051         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL2, bufQ[i],
     2069        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL2, bufQ[i],
    20522070                                     bufQ[i]
    20532071                                    );
     
    20562074    {
    20572075      for (int i= 0; i < factors.length(); i++, j++)
    2058         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     2076        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    20592077    }
    20602078    useOldQs= true;
     
    21752193  CFListIterator j;
    21762194  Variable y= F.mvar();
    2177   CanonicalForm powX, imBasis;
     2195  CanonicalForm powX, imBasis, truncF;
    21782196  CFMatrix Mat, C;
    21792197  CFIterator iter;
     
    22022220      setCharacteristic (getCharacteristic(), degMipo, info.getGFName());
    22032221
     2222    truncF= mod (F, power (y, l));
    22042223    if (useOldQs)
    22052224    {
    22062225      for (int i= 0; i < factors.length(); i++, j++)
    2207         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL2, bufQ[i],
     2226        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL2, bufQ[i],
    22082227                                     bufQ[i]
    22092228                                    );
     
    22122231    {
    22132232      for (int i= 0; i < factors.length(); i++, j++)
    2214         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     2233        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    22152234    }
    22162235    useOldQs= true;
     
    23582377  bool useOldQs= false;
    23592378  bool hitBound= false;
    2360   Variable y= Variable (2);
    23612379  CFListIterator j;
    23622380  CFMatrix C;
    23632381  CFArray buf;
    23642382  mat_zz_pE* NTLC, NTLK;
     2383  Variable y= F.mvar();
     2384  CanonicalForm truncF;
    23652385  while (l <= precision)
    23662386  {
    23672387    j= factors;
     2388    truncF= mod (F, power (y, l));
    23682389    if (useOldQs)
    23692390    {
    23702391      for (int i= 0; i < factors.length(); i++, j++)
    2371         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i], bufQ[i]);
     2392        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i], bufQ[i]);
    23722393    }
    23732394    else
    23742395    {
    23752396      for (int i= 0; i < factors.length(); i++, j++)
    2376         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     2397        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    23772398    }
    23782399    useOldQs= true;
     
    24782499  mat_zz_p* NTLC, NTLK;
    24792500  CFArray buf;
     2501  Variable y= F.mvar();
     2502  CanonicalForm truncF;
    24802503  while (l <= precision)
    24812504  {
    24822505    j= factors;
     2506    truncF= mod (F, power (y, l));
    24832507    if (useOldQs)
    24842508    {
    24852509      for (int i= 0; i < factors.length(); i++, j++)
    2486         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL2, bufQ[i],
     2510        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL2, bufQ[i],
    24872511                                     bufQ[i]
    24882512                                    );
     
    24912515    {
    24922516      for (int i= 0; i < factors.length(); i++, j++)
    2493         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     2517        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    24942518    }
    24952519    useOldQs= true;
     
    25952619  CFArray buf;
    25962620  mat_zz_p* NTLC, NTLK;
    2597   CanonicalForm bufF;
     2621  CanonicalForm bufF, truncF;
    25982622  CFList bufUniFactors;
     2623  Variable y= F.mvar();
    25992624  while (oldL <= l)
    26002625  {
    26012626    j= factors;
     2627    truncF= mod (F, power (y, oldL));
    26022628    if (useOldQs)
    26032629    {
    26042630      for (int i= 0; i < factors.length(); i++, j++)
    2605         A[i]= logarithmicDerivative (F, j.getItem(), oldL, oldL2, bufQ[i],
     2631        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, oldL2, bufQ[i],
    26062632                                     bufQ[i]
    26072633                                    );
     
    26102636    {
    26112637      for (int i= 0; i < factors.length(); i++, j++)
    2612         A[i]= logarithmicDerivative (F, j.getItem(), oldL, bufQ [i]);
     2638        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, bufQ [i]);
    26132639    }
    26142640    useOldQs= true;
     
    26952721  CFArray buf;
    26962722  mat_zz_pE* NTLC, NTLK;
    2697   CanonicalForm bufF;
     2723  CanonicalForm bufF, truncF;
    26982724  CFList bufUniFactors;
     2725  Variable y= F.mvar();
    26992726  while (oldL <= l)
    27002727  {
    27012728    j= factors;
     2729    truncF= mod (F, power (y, oldL));
    27022730    if (useOldQs)
    27032731    {
    27042732      for (int i= 0; i < factors.length(); i++, j++)
    2705         A[i]= logarithmicDerivative (F, j.getItem(), oldL, oldL2, bufQ[i],
     2733        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, oldL2, bufQ[i],
    27062734                                     bufQ[i]
    27072735                                    );
     
    27102738    {
    27112739      for (int i= 0; i < factors.length(); i++, j++)
    2712         A[i]= logarithmicDerivative (F, j.getItem(), oldL, bufQ [i]);
     2740        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, bufQ [i]);
    27132741    }
    27142742    useOldQs= true;
     
    28042832  Variable y= F.mvar();
    28052833  CFListIterator j;
    2806   CanonicalForm powX, imBasis, bufF;
     2834  CanonicalForm powX, imBasis, bufF, truncF;
    28072835  CFMatrix Mat, C;
    28082836  CFIterator iter;
     
    28342862      setCharacteristic (getCharacteristic(), degMipo, info.getGFName());
    28352863
     2864    truncF= mod (F, power (y, oldL));
    28362865    if (useOldQs)
    28372866    {
    28382867      for (int i= 0; i < factors.length(); i++, j++)
    2839         A[i]= logarithmicDerivative (F, j.getItem(), oldL, oldL2, bufQ[i],
     2868        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, oldL2, bufQ[i],
    28402869                                     bufQ[i]);
    28412870    }
     
    28432872    {
    28442873      for (int i= 0; i < factors.length(); i++, j++)
    2845         A[i]= logarithmicDerivative (F, j.getItem(), oldL, bufQ [i]);
     2874        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, bufQ [i]);
    28462875    }
    28472876    useOldQs= true;
     
    29713000  CFArray buf;
    29723001  mat_zz_p* NTLC, NTLK;
    2973   CanonicalForm bufF;
     3002  CanonicalForm bufF, truncF;
    29743003  CFList bufUniFactors;
     3004  Variable y= F.mvar();
    29753005  while (oldL <= l)
    29763006  {
    29773007    j= factors;
     3008    truncF= mod (F, power (y, oldL));
    29783009    if (useOldQs)
    29793010    {
    29803011      for (int i= 0; i < factors.length(); i++, j++)
    2981         A[i]= logarithmicDerivative (F, j.getItem(), oldL, oldL2, bufQ[i],
     3012        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, oldL2, bufQ[i],
    29823013                                     bufQ[i]
    29833014                                    );
     
    29863017    {
    29873018      for (int i= 0; i < factors.length(); i++, j++)
    2988         A[i]= logarithmicDerivative (F, j.getItem(), oldL, bufQ [i]);
     3019        A[i]= logarithmicDerivative (truncF, j.getItem(), oldL, bufQ [i]);
    29893020    }
    29903021    useOldQs= true;
     
    30733104  CFArray buf;
    30743105  mat_zz_p* NTLC, NTLK;
    3075   CanonicalForm bufF;
     3106  CanonicalForm bufF, truncF;
     3107  Variable y= F.mvar();
    30763108  while (l <= liftBound)
    30773109  {
     
    30813113    bufFactors.removeFirst();
    30823114    j= bufFactors;
     3115    truncF= mod (F, power (y, l));
    30833116    if (useOldQs)
    30843117    {
    30853118      for (int i= 0; i < bufFactors.length(); i++, j++)
    3086         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i],bufQ[i]);
     3119        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
     3120                                     bufQ[i]);
    30873121    }
    30883122    else
    30893123    {
    30903124      for (int i= 0; i < bufFactors.length(); i++, j++)
    3091         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     3125        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    30923126    }
    30933127    for (int i= 0; i < d; i++)
     
    32083242  CFArray buf;
    32093243  mat_zz_pE* NTLC, NTLK;
    3210   CanonicalForm bufF;
     3244  CanonicalForm bufF, truncF;
     3245  Variable y= F.mvar();
    32113246  while (l <= liftBound)
    32123247  {
     
    32143249    henselLiftResume12 (F, bufFactors, oldL, l, Pi, diophant, M);
    32153250    j= bufFactors;
     3251    truncF= mod (F, power (y, l));
    32163252    if (useOldQs)
    32173253    {
    32183254      for (int i= 0; i < bufFactors.length(); i++, j++)
    3219         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i],bufQ[i]);
     3255        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
     3256                                     bufQ[i]);
    32203257    }
    32213258    else
    32223259    {
    32233260      for (int i= 0; i < bufFactors.length(); i++, j++)
    3224         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     3261        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    32253262    }
    32263263    for (int i= 0; i < d; i++)
     
    33463383    ident (NTLN, factors.length());
    33473384  Variable y= F.mvar();
    3348   CanonicalForm powX, imBasis, bufF;
     3385  CanonicalForm powX, imBasis, bufF, truncF;
    33493386  CFMatrix Mat, C;
    33503387  CFIterator iter;
     
    33803417
    33813418    j= bufFactors;
     3419    truncF= mod (F, power (y, l));
    33823420    if (useOldQs)
    33833421    {
    33843422      for (int i= 0; i < bufFactors.length(); i++, j++)
    3385         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i],bufQ[i]);
     3423        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
     3424                                     bufQ[i]);
    33863425    }
    33873426    else
    33883427    {
    33893428      for (int i= 0; i < bufFactors.length(); i++, j++)
    3390         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     3429        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    33913430    }
    33923431    for (int i= 0; i < d; i++)
     
    35413580  CFMatrix C;
    35423581  mat_zz_p* NTLC, NTLK;
    3543   CanonicalForm bufF;
     3582  CanonicalForm bufF, truncF;
     3583  Variable y= F.mvar();
    35443584  while (l <= liftBound)
    35453585  {
     
    35473587    henselLiftResume12 (F, bufFactors, oldL, l, Pi, diophant, M);
    35483588    j= bufFactors;
     3589    truncF= mod (F, power (y, l));
    35493590    if (useOldQs)
    35503591    {
    35513592      for (int i= 0; i < bufFactors.length(); i++, j++)
    3552         A[i]= logarithmicDerivative (F, j.getItem(), l, oldL, bufQ[i],bufQ[i]);
     3593        A[i]= logarithmicDerivative (truncF, j.getItem(), l, oldL, bufQ[i],
     3594                                     bufQ[i]);
    35533595    }
    35543596    else
    35553597    {
    35563598      for (int i= 0; i < bufFactors.length(); i++, j++)
    3557         A[i]= logarithmicDerivative (F, j.getItem(), l, bufQ [i]);
     3599        A[i]= logarithmicDerivative (truncF, j.getItem(), l, bufQ [i]);
    35583600    }
    35593601    for (int i= 0; i < d; i++)
  • factory/facFqBivarUtil.cc

    re5fc00c r5335ba  
    483483  CanonicalForm logDeriv;
    484484
    485   CanonicalForm bufF= mod (F, xToL);
     485  CanonicalForm bufF= F;
    486486  CanonicalForm oldF= mulMod2 (G, oldQ, xToL);
    487487  bufF -= oldF;
  • factory/facFqBivarUtil.h

    re5fc00c r5335ba  
    191191///         Variable (2)^l
    192192CFArray
    193 logarithmicDerivative (const CanonicalForm& F,   ///< [in] bivariate poly
     193logarithmicDerivative (const CanonicalForm& F,   ///< [in] bivariate poly
     194                                                 ///< truncated at Variable(2)^l
    194195                       const CanonicalForm& G,   ///< [in] a factor of F
    195196                       int l,                    ///< [in] lifting precision
Note: See TracChangeset for help on using the changeset viewer.