Changeset dd5ab89 in git


Ignore:
Timestamp:
Apr 29, 2013, 12:43:59 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '79dfb9a6d258bfeb991428bdb25b8f55e9e809b2')
Children:
aba90e858d998d23e9f343db0210fff2a167df2f
Parents:
34636b48632d13ac0387fd040ea2249787e2b993
git-author:
Martin Lee <martinlee84@web.de>2013-04-29 12:43:59+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-05-23 18:18:13+02:00
Message:
chg: deleted unused code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd_smallp.cc

    r34636b rdd5ab89  
    537537  ppB= B/cB;
    538538
    539   int sizeNewtonPolyg;
    540   int ** newtonPolyg= NULL;
    541   mat_ZZ MM;
    542   vec_ZZ V;
    543   bool compressConvexDense= false; //(ppA.level() == 2 && ppB.level() == 2);
    544   if (compressConvexDense)
    545   {
    546     CanonicalForm bufcA= cA;
    547     CanonicalForm bufcB= cB;
    548     cA= content (ppA, 1);
    549     cB= content (ppB, 1);
    550     ppA /= cA;
    551     ppB /= cB;
    552     gcdcAcB *= gcd (cA, cB);
    553     cA *= bufcA;
    554     cB *= bufcB;
    555     if (ppA.isUnivariate() || ppB.isUnivariate())
    556     {
    557       if (ppA.level() == ppB.level())
    558       {
    559         CanonicalForm result= gcd (ppA, ppB);
    560         coF= N ((ppA/result)*(cA/gcdcAcB));
    561         coG= N ((ppB/result)*(cB/gcdcAcB));
    562         return N (result*gcdcAcB);
    563       }
    564       else
    565       {
    566         coF= N (ppA*(cA/gcdcAcB));
    567         coG= N (ppB*(cB/gcdcAcB));
    568         return N (gcdcAcB);
    569       }
    570     }
    571 
    572     newtonPolyg= newtonPolygon (ppA,ppB, sizeNewtonPolyg);
    573     convexDense (newtonPolyg, sizeNewtonPolyg, MM, V);
    574 
    575     for (int i= 0; i < sizeNewtonPolyg; i++)
    576       delete [] newtonPolyg[i];
    577     delete [] newtonPolyg;
    578 
    579     ppA= compress (ppA, MM, V, false);
    580     ppB= compress (ppB, MM, V, false);
    581     MM= inv (MM);
    582 
    583     if (ppA.isUnivariate() && ppB.isUnivariate())
    584     {
    585       if (ppA.level() == ppB.level())
    586       {
    587         CanonicalForm result= gcd (ppA, ppB);
    588         coF= N (decompress ((ppA/result), MM, V)*(cA/gcdcAcB));
    589         coG= N (decompress ((ppB/result), MM, V)*(cB/gcdcAcB));
    590         return N (decompress (result, MM, V)*gcdcAcB);
    591       }
    592       else
    593       {
    594         coF= N (decompress (ppA, MM, V));
    595         coG= N (decompress (ppB, MM, V));
    596         return N (gcdcAcB);
    597       }
    598     }
    599   }
    600 
    601539  CanonicalForm lcA, lcB;  // leading coefficients of A and B
    602540  CanonicalForm gcdlcAlcB;
     
    604542  lcA= uni_lcoeff (ppA);
    605543  lcB= uni_lcoeff (ppB);
    606 
    607   /*if (fdivides (lcA, lcB))
    608   {
    609     if (fdivides (A, B))
    610       return F/Lc(F);
    611   }
    612   if (fdivides (lcB, lcA))
    613   {
    614     if (fdivides (B, A))
    615       return G/Lc(G);
    616   }*/
    617544
    618545  gcdlcAlcB= gcd (lcA, lcB);
     
    817744          ppCoG= mapDown (ppCoG, prim_elem, im_prim_elem, alpha, u, v);
    818745          DEBOUTLN (cerr, "ppH after mapDown= " << ppH);
    819           if (compressConvexDense)
    820           {
    821             ppH= decompress (ppH, MM, V);
    822             ppCoF= decompress (ppCoF, MM, V);
    823             ppCoG= decompress (ppCoG, MM, V);
    824           }
    825746          coF= N ((cA/gcdcAcB)*ppCoF);
    826747          coG= N ((cB/gcdcAcB)*ppCoG);
     
    835756                (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG)))
    836757      {
    837         if (compressConvexDense)
    838         {
    839           ppH= decompress (ppH, MM, V);
    840           ppCoF= decompress (ppCoF, MM, V);
    841           ppCoG= decompress (ppCoG, MM, V);
    842         }
    843758        coF= N ((cA/gcdcAcB)*ppCoF);
    844759        coG= N ((cB/gcdcAcB)*ppCoG);
     
    998913  ppB= B/cB;
    999914
    1000   int sizeNewtonPolyg;
    1001   int ** newtonPolyg= NULL;
    1002   mat_ZZ MM;
    1003   vec_ZZ V;
    1004   bool compressConvexDense= false; //(ppA.level() == 2 && ppB.level() == 2);
    1005   if (compressConvexDense)
    1006   {
    1007     CanonicalForm bufcA= cA;
    1008     CanonicalForm bufcB= cB;
    1009     cA= content (ppA, 1);
    1010     cB= content (ppB, 1);
    1011     ppA /= cA;
    1012     ppB /= cB;
    1013     gcdcAcB *= gcd (cA, cB);
    1014     cA *= bufcA;
    1015     cB *= bufcB;
    1016     if (ppA.isUnivariate() || ppB.isUnivariate())
    1017     {
    1018       if (ppA.level() == ppB.level())
    1019       {
    1020         CanonicalForm result= gcd (ppA, ppB);
    1021         coF= N ((ppA/result)*(cA/gcdcAcB));
    1022         coG= N ((ppB/result)*(cB/gcdcAcB));
    1023         return N (result*gcdcAcB);
    1024       }
    1025       else
    1026       {
    1027         coF= N (ppA*(cA/gcdcAcB));
    1028         coG= N (ppB*(cB/gcdcAcB));
    1029         return N (gcdcAcB);
    1030       }
    1031     }
    1032 
    1033     newtonPolyg= newtonPolygon (ppA,ppB, sizeNewtonPolyg);
    1034     convexDense (newtonPolyg, sizeNewtonPolyg, MM, V);
    1035 
    1036     for (int i= 0; i < sizeNewtonPolyg; i++)
    1037       delete [] newtonPolyg[i];
    1038     delete [] newtonPolyg;
    1039 
    1040     ppA= compress (ppA, MM, V, false);
    1041     ppB= compress (ppB, MM, V, false);
    1042     MM= inv (MM);
    1043 
    1044     if (ppA.isUnivariate() && ppB.isUnivariate())
    1045     {
    1046       if (ppA.level() == ppB.level())
    1047       {
    1048         CanonicalForm result= gcd (ppA, ppB);
    1049         coF= N (decompress ((ppA/result), MM, V)*(cA/gcdcAcB));
    1050         coG= N (decompress ((ppB/result), MM, V)*(cB/gcdcAcB));
    1051         return N (decompress (result, MM, V)*gcdcAcB);
    1052       }
    1053       else
    1054       {
    1055         coF= N (decompress (ppA, MM, V));
    1056         coG= N (decompress (ppB, MM, V));
    1057         return N (gcdcAcB);
    1058       }
    1059     }
    1060   }
    1061 
    1062915  CanonicalForm lcA, lcB;  // leading coefficients of A and B
    1063916  CanonicalForm gcdlcAlcB;
     
    1065918  lcA= uni_lcoeff (ppA);
    1066919  lcB= uni_lcoeff (ppB);
    1067 
    1068   /*if (fdivides (lcA, lcB))
    1069   {
    1070     if (fdivides (ppA, ppB, coG))
    1071     {
    1072       coF= 1;
    1073       if (compressConvexDense)
    1074         coG= decompress (coG, MM, V);
    1075       coG= N (coG*(cB/gcdcAcB));
    1076       return F;
    1077     }
    1078   }
    1079   if (fdivides (lcB, lcA))
    1080   {
    1081     if (fdivides (ppB, ppA, coF))
    1082     {
    1083       coG= 1;
    1084       if (compressConvexDense)
    1085         coF= decompress (coF, MM, V);
    1086       coF= N (coF*(cA/gcdcAcB));
    1087       return G;
    1088     }
    1089   }*/
    1090920
    1091921  gcdlcAlcB= gcd (lcA, lcB);
     
    1119949  H= 0;
    1120950  bool fail= false;
    1121   //topLevel= false;
     951  topLevel= false;
    1122952  bool inextension= false;
    1123953  int p=-1;
     
    12651095          ppCoG= GFMapDown (ppCoG, k);
    12661096          DEBOUTLN (cerr, "ppH after mapDown= " << ppH);
    1267           if (compressConvexDense)
    1268           {
    1269             ppH= decompress (ppH, MM, V);
    1270             ppCoF= decompress (ppCoF, MM, V);
    1271             ppCoG= decompress (ppCoG, MM, V);
    1272           }
    12731097          coF= N ((cA/gcdcAcB)*ppCoF);
    12741098          coG= N ((cB/gcdcAcB)*ppCoG);
     
    12861110           (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG)))
    12871111        {
    1288           if (compressConvexDense)
    1289           {
    1290             ppH= decompress (ppH, MM, V);
    1291             ppCoF= decompress (ppCoF, MM, V);
    1292             ppCoG= decompress (ppCoG, MM, V);
    1293           }
    12941112          coF= N ((cA/gcdcAcB)*ppCoF);
    12951113          coG= N ((cB/gcdcAcB)*ppCoG);
     
    14591277  ppB= B/cB;
    14601278
    1461   int sizeNewtonPolyg;
    1462   int ** newtonPolyg= NULL;
    1463   mat_ZZ MM;
    1464   vec_ZZ V;
    1465   bool compressConvexDense= false; //(ppA.level() == 2 && ppB.level() == 2);
    1466   if (compressConvexDense)
    1467   {
    1468     CanonicalForm bufcA= cA;
    1469     CanonicalForm bufcB= cB;
    1470     cA= content (ppA, 1);
    1471     cB= content (ppB, 1);
    1472     ppA /= cA;
    1473     ppB /= cB;
    1474     gcdcAcB *= gcd (cA, cB);
    1475     cA *= bufcA;
    1476     cB *= bufcB;
    1477     if (ppA.isUnivariate() || ppB.isUnivariate())
    1478     {
    1479       if (ppA.level() == ppB.level())
    1480       {
    1481         CanonicalForm result= gcd (ppA, ppB);
    1482         coF= N ((ppA/result)*(cA/gcdcAcB));
    1483         coG= N ((ppB/result)*(cB/gcdcAcB));
    1484         return N (result*gcdcAcB);
    1485       }
    1486       else
    1487       {
    1488         coF= N (ppA*(cA/gcdcAcB));
    1489         coG= N (ppB*(cB/gcdcAcB));
    1490         return N (gcdcAcB);
    1491       }
    1492     }
    1493 
    1494     newtonPolyg= newtonPolygon (ppA,ppB, sizeNewtonPolyg);
    1495     convexDense (newtonPolyg, sizeNewtonPolyg, MM, V);
    1496 
    1497     for (int i= 0; i < sizeNewtonPolyg; i++)
    1498       delete [] newtonPolyg[i];
    1499     delete [] newtonPolyg;
    1500 
    1501     ppA= compress (ppA, MM, V, false);
    1502     ppB= compress (ppB, MM, V, false);
    1503     MM= inv (MM);
    1504 
    1505     if (ppA.isUnivariate() && ppB.isUnivariate())
    1506     {
    1507       if (ppA.level() == ppB.level())
    1508       {
    1509         CanonicalForm result= gcd (ppA, ppB);
    1510         coF= N (decompress ((ppA/result), MM, V)*(cA/gcdcAcB));
    1511         coG= N (decompress ((ppB/result), MM, V)*(cB/gcdcAcB));
    1512         return N (decompress (result, MM, V)*gcdcAcB);
    1513       }
    1514       else
    1515       {
    1516         coF= N (decompress (ppA, MM, V));
    1517         coG= N (decompress (ppB, MM, V));
    1518         return N (gcdcAcB);
    1519       }
    1520     }
    1521   }
    1522 
    15231279  CanonicalForm lcA, lcB;  // leading coefficients of A and B
    15241280  CanonicalForm gcdlcAlcB;
    15251281  lcA= uni_lcoeff (ppA);
    15261282  lcB= uni_lcoeff (ppB);
    1527 
    1528   /*if (fdivides (lcA, lcB))
    1529   {
    1530     if (fdivides (A, B))
    1531       return F/Lc(F);
    1532   }
    1533   if (fdivides (lcB, lcA))
    1534   {
    1535     if (fdivides (B, A))
    1536       return G/Lc(G);
    1537   }*/
    15381283
    15391284  gcdlcAlcB= gcd (lcA, lcB);
     
    17761521           (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG)))
    17771522      {
    1778         if (compressConvexDense)
    1779         {
    1780           ppH= decompress (ppH, MM, V);
    1781           ppCoF= decompress (ppCoF, MM, V);
    1782           ppCoG= decompress (ppCoG, MM, V);
    1783         }
    17841523        coF= N ((cA/gcdcAcB)*ppCoF);
    17851524        coG= N ((cB/gcdcAcB)*ppCoG);
Note: See TracChangeset for help on using the changeset viewer.