Changeset 59b329d in tol
- Timestamp:
- Oct 17, 2012, 4:18:28 PM (14 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- c2d5bcee
- Parents:
- 6ca24fa
- File:
-
- 1 edited
-
tol/btol/polynomial_type/polgra.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/polynomial_type/polgra.cpp
r6ca24fa r59b329d 510 510 BPol p1 = BPol::One(); 511 511 BPol p2 = BPol::One(); 512 BUniformDist u(-1,1);513 512 BDat a, b, d, m1, m2; 514 513 BPol B0 = BPol::One(); 515 514 BPol BP = BPol::X() ^ period; 516 515 BPol factor; 516 BUniformDist u(-1,1); 517 517 518 if(maxInvRootModule>1-2*DEpsilon()) { maxInvRootModule = 1-2*DEpsilon(); } 518 519 if(maxInvRootModule< 2*DEpsilon()) { maxInvRootModule = 2*DEpsilon(); } … … 525 526 if(n1) 526 527 { 528 BUniformDist v(0,1); 529 BDat vr = v.Random(); 527 530 BDat ur = u.Random(); 528 a = maxInvRootModule*ur + minInvRootModule*(1-ur); 531 a = maxInvRootModule*vr + minInvRootModule*(1-vr); 532 if(ur<0) { a*=-1.0; } 529 533 factor = B0-a*BP; 530 534 //Std(BText("\nRandStationary(")+degree+","+period+","+maxInvRootModule+") monome a="+a+"; factor="+factor.Name());
Note: See TracChangeset
for help on using the changeset viewer.
