Changeset 3ff49d in git
 Timestamp:
 Aug 2, 2013, 3:34:18 PM (10 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 a1ff8d592963766e1732d43681575150f9d9ea4f
 Parents:
 ae1735dae5c3034d933f9a8b0c463ff13b4b3521
 gitauthor:
 Martin Lee <martinlee84@web.de>20130802 15:34:18+02:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20130830 13:48:28+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/facAbsFact.cc
rae1735 r3ff49d 126 126 CanonicalForm w= G*derivH; 127 127 Variable y= Variable (F.level()+1); 128 w= replacevar (w, alpha, y); //teuer128 w= replacevar (w, alpha, y); 129 129 130 130 int s= totaldegree (F)/totaldegree (H); … … 225 225 } 226 226 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 227 CFAFList absFactorize (const CanonicalForm& G 279 228 ) 280 229 { … … 381 330 382 331 TIMING_START (abs_fac_evaluation); 383 evaluationWRTDifferentSecondVars 4AbsFact(bufAeval2, bufEvaluation, A);332 evaluationWRTDifferentSecondVars (bufAeval2, bufEvaluation, A); 384 333 TIMING_END_AND_PRINT (abs_fac_evaluation, 385 334 "time to eval wrt diff second vars in abs fact: "); … … 422 371 { 423 372 if (absBufBiFactors.length() < absBiFactors.length()  424 ((bufLift < lift) && (absBufBiFactors.length() == absBiFactors.length()))  373 ((bufLift < lift) && 374 (absBufBiFactors.length() == absBiFactors.length()))  425 375 counter > differentSecondVar) 426 376 { … … 496 446 for (CFListIterator iter= rationalFactors; iter.hasItem(); iter++) 497 447 { 498 if (totaldegre e (iter.getItem())*degree (getMipo(v)) == totaldegree (G))448 if (totaldegre(iter.getItem())*degree(getMipo(v)) == totaldegree (G)) 499 449 { 500 450 factors= CFAFList (CFAFactor (iter.getItem(), getMipo (v), 1)); … … 550 500 551 501 if (!LCmultiplierIsConst) 552 distributeLCmultiplier (A, leadingCoeffs, biFactors, evaluation, LCmultiplier); 502 distributeLCmultiplier (A, leadingCoeffs, biFactors, evaluation, 503 LCmultiplier); 553 504 554 505 //prepare leading coefficients … … 595 546 for (CFListIterator iter= rationalFactors; iter.hasItem(); iter++) 596 547 { 597 if (totaldegree 548 if (totaldegree(iter.getItem())*degree (getMipo (v)) == totaldegree (G)) 598 549 { 599 550 factors= CFAFList (CFAFactor (iter.getItem(), getMipo (v), 1)); … … 646 597 CFList contents, LCs; 647 598 bool foundTrueMultiplier= false; 648 LCHeuristic2 (LCmultiplier, rationalFactors,leadingCoeffs2[lengthAeval21],599 LCHeuristic2 (LCmultiplier,rationalFactors,leadingCoeffs2[lengthAeval21], 649 600 contents, LCs, foundTrueMultiplier); 650 601 if (foundTrueMultiplier) … … 660 611 { 661 612 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); 664 615 // coming from above: divide out more LCmultiplier if possible 665 616 if (foundMultiplier) 666 617 { 667 618 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, 670 621 foundMultiplier); 671 622 } … … 812 763 813 764 TIMING_START (abs_fac_hensel_lift); 814 rationalFactors= nonMonicHenselLift (Aeval, biFactors, leadingCoeffs2,diophant,765 rationalFactors= nonMonicHenselLift (Aeval, biFactors,leadingCoeffs2,diophant, 815 766 Pi, liftBounds, liftBoundsLength, noOneToOne); 816 767 TIMING_END_AND_PRINT (abs_fac_hensel_lift,
Note: See TracChangeset
for help on using the changeset viewer.