Changeset 3ff49d in git


Ignore:
Timestamp:
Aug 2, 2013, 3:34:18 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
a1ff8d592963766e1732d43681575150f9d9ea4f
Parents:
ae1735dae5c3034d933f9a8b0c463ff13b4b3521
git-author:
Martin Lee <martinlee84@web.de>2013-08-02 15:34:18+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-08-30 13:48:28+02:00
Message:
chg: formatting and removed unnecessary function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facAbsFact.cc

    rae1735 r3ff49d  
    126126  CanonicalForm w= G*derivH;
    127127  Variable y= Variable (F.level()+1);
    128   w= replacevar (w, alpha, y); //teuer
     128  w= replacevar (w, alpha, y);
    129129
    130130  int s= totaldegree (F)/totaldegree (H);
     
    225225}
    226226
    227 void
    228 evaluationWRTDifferentSecondVars4AbsFact (CFList*& Aeval,
    229                                           const CFList& evaluation,
    230                                           const CanonicalForm& A)
    231 {
    232   CanonicalForm tmp;
    233   CFList tmp2;
    234   CFFList uniFactors;
    235   CFListIterator iter;
    236   bool preserveDegree= true;
    237   Variable x= Variable (1);
    238   int j, degAi, degA1= degree (A,1);
    239   for (int i= A.level(); i > 2; i--)
    240   {
    241     tmp= A;
    242     tmp2= CFList();
    243     iter= evaluation;
    244     preserveDegree= true;
    245     degAi= degree (A,i);
    246     for (j= A.level(); j > 1; j--, iter++)
    247     {
    248       if (j == i)
    249         continue;
    250       else
    251       {
    252         tmp= tmp (iter.getItem(), j);
    253         tmp2.insert (tmp);
    254         if ((degree (tmp, i) != degAi) ||
    255             (degree (tmp, 1) != degA1))
    256         {
    257           preserveDegree= false;
    258           break;
    259         }
    260       }
    261     }
    262     if (!content(tmp,1).inCoeffDomain())
    263       preserveDegree= false;
    264     if (!(gcd (deriv (tmp,x), tmp)).inCoeffDomain())
    265       preserveDegree= false;
    266     uniFactors= factorize (tmp);
    267     if (uniFactors.getFirst().factor().inCoeffDomain())
    268       uniFactors.removeFirst();
    269     if (uniFactors.length() > 1 || uniFactors.getFirst().exp() > 1)
    270       preserveDegree= false;
    271     if (preserveDegree)
    272       Aeval [i - 3]= tmp2;
    273     else
    274       Aeval [i - 3]= CFList();
    275   }
    276 }
    277 
    278 CFAFList absFactorize (const CanonicalForm& G ///<[in] bivariate poly over Q
     227CFAFList absFactorize (const CanonicalForm& G
    279228                           )
    280229{
     
    381330
    382331    TIMING_START (abs_fac_evaluation);
    383     evaluationWRTDifferentSecondVars4AbsFact (bufAeval2, bufEvaluation, A);
     332    evaluationWRTDifferentSecondVars (bufAeval2, bufEvaluation, A);
    384333    TIMING_END_AND_PRINT (abs_fac_evaluation,
    385334                          "time to eval wrt diff second vars in abs fact: ");
     
    422371    {
    423372      if (absBufBiFactors.length() < absBiFactors.length() ||
    424           ((bufLift < lift) && (absBufBiFactors.length() == absBiFactors.length())) ||
     373          ((bufLift < lift) &&
     374          (absBufBiFactors.length() == absBiFactors.length())) ||
    425375          counter > differentSecondVar)
    426376      {
     
    496446        for (CFListIterator iter= rationalFactors; iter.hasItem(); iter++)
    497447        {
    498           if (totaldegree (iter.getItem())*degree (getMipo (v)) == totaldegree (G))
     448          if (totaldegre(iter.getItem())*degree(getMipo(v)) == totaldegree (G))
    499449          {
    500450            factors= CFAFList (CFAFactor (iter.getItem(), getMipo (v), 1));
     
    550500
    551501  if (!LCmultiplierIsConst)
    552     distributeLCmultiplier (A, leadingCoeffs, biFactors, evaluation, LCmultiplier);
     502    distributeLCmultiplier (A, leadingCoeffs, biFactors, evaluation,
     503                            LCmultiplier);
    553504
    554505  //prepare leading coefficients
     
    595546      for (CFListIterator iter= rationalFactors; iter.hasItem(); iter++)
    596547      {
    597         if (totaldegree (iter.getItem())*degree (getMipo (v)) == totaldegree (G))
     548        if (totaldegree(iter.getItem())*degree (getMipo (v)) == totaldegree (G))
    598549        {
    599550          factors= CFAFList (CFAFactor (iter.getItem(), getMipo (v), 1));
     
    646597      CFList contents, LCs;
    647598      bool foundTrueMultiplier= false;
    648       LCHeuristic2 (LCmultiplier, rationalFactors, leadingCoeffs2[lengthAeval2-1],
     599      LCHeuristic2 (LCmultiplier,rationalFactors,leadingCoeffs2[lengthAeval2-1],
    649600                    contents, LCs, foundTrueMultiplier);
    650601      if (foundTrueMultiplier)
     
    660611      {
    661612        bool foundMultiplier= false;
    662         LCHeuristic3 (LCmultiplier, rationalFactors, oldBiFactors, contents, oldAeval,
    663                       A, leadingCoeffs2, lengthAeval2, foundMultiplier);
     613        LCHeuristic3 (LCmultiplier, rationalFactors, oldBiFactors, contents,
     614                      oldAeval,A,leadingCoeffs2, lengthAeval2, foundMultiplier);
    664615        // coming from above: divide out more LCmultiplier if possible
    665616        if (foundMultiplier)
    666617        {
    667618          foundMultiplier= false;
    668           LCHeuristic4 (oldBiFactors, oldAeval, contents, rationalFactors, testVars,
    669                         lengthAeval2, leadingCoeffs2, A, LCmultiplier,
     619          LCHeuristic4 (oldBiFactors, oldAeval, contents, rationalFactors,
     620                        testVars, lengthAeval2, leadingCoeffs2, A, LCmultiplier,
    670621                        foundMultiplier);
    671622        }
     
    812763
    813764  TIMING_START (abs_fac_hensel_lift);
    814   rationalFactors= nonMonicHenselLift (Aeval, biFactors, leadingCoeffs2, diophant,
     765  rationalFactors= nonMonicHenselLift (Aeval, biFactors,leadingCoeffs2,diophant,
    815766                               Pi, liftBounds, liftBoundsLength, noOneToOne);
    816767  TIMING_END_AND_PRINT (abs_fac_hensel_lift,
Note: See TracChangeset for help on using the changeset viewer.