Changeset d8a7da in git for factory/facFqBivarUtil.cc
 Timestamp:
 Mar 15, 2013, 1:54:27 PM (10 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
 Children:
 93e7364ff81efde654648b43b93070f1ff358dfe
 Parents:
 cd429e3b827c72970f7c3db6b3b3d12f45e000f0
 gitauthor:
 Martin Lee <martinlee84@web.de>20130315 13:54:27+01:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20130322 15:52:34+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/facFqBivarUtil.cc
rcd429e rd8a7da 735 735 } 736 736 737 int * 738 computeBoundsWrtDiffMainvar (const CanonicalForm& F, int& n, 739 bool& isIrreducible) 740 { 741 n= degree (F, 2); 742 int* result= new int [n]; 743 int sizeOfNewtonPolygon; 744 int** newtonPolyg= newtonPolygon (F, sizeOfNewtonPolygon); 745 746 isIrreducible= false; 747 if (sizeOfNewtonPolygon == 3) 748 { 749 bool check1= 750 (newtonPolyg[0][0]==0  newtonPolyg[1][0]==0  newtonPolyg[2][0]==0); 751 if (check1) 752 { 753 bool check2= 754 (newtonPolyg[0][1]==0  newtonPolyg[1][1]==0  newtonPolyg[2][0]==0); 755 if (check2) 756 { 757 int p=getCharacteristic(); 758 int d=1; 759 char bufGFName='Z'; 760 bool GF= (CFFactory::gettype()==GaloisFieldDomain); 761 if (GF) 762 { 763 d= getGFDegree(); 764 bufGFName=gf_name; 765 } 766 setCharacteristic(0); 767 CanonicalForm tmp= gcd (newtonPolyg[0][0],newtonPolyg[0][1]); 768 tmp= gcd (tmp, newtonPolyg[1][0]); 769 tmp= gcd (tmp, newtonPolyg[1][1]); 770 tmp= gcd (tmp, newtonPolyg[2][0]); 771 tmp= gcd (tmp, newtonPolyg[2][1]); 772 isIrreducible= (tmp==1); 773 if (GF) 774 setCharacteristic (p, d, bufGFName); 775 else 776 setCharacteristic(p); 777 } 778 } 779 } 780 781 int minX, minY, maxX, maxY; 782 minX= newtonPolyg [0] [0]; 783 minY= newtonPolyg [0] [1]; 784 maxX= minX; 785 maxY= minY; 786 for (int i= 1; i < sizeOfNewtonPolygon; i++) 787 { 788 if (minX > newtonPolyg [i] [0]) 789 minX= newtonPolyg [i] [0]; 790 if (maxX < newtonPolyg [i] [0]) 791 maxX= newtonPolyg [i] [0]; 792 if (minY > newtonPolyg [i] [1]) 793 minY= newtonPolyg [i] [1]; 794 if (maxY < newtonPolyg [i] [1]) 795 maxY= newtonPolyg [i] [1]; 796 } 797 798 int k= maxY; 799 for (int i= 0; i < n; i++) 800 { 801 if (i + 1 > maxX  i + 1 < minX) 802 { 803 result [i]= 0; 804 continue; 805 } 806 int* point= new int [2]; 807 point [0]= i + 1; 808 point [1]= k; 809 while (!isInPolygon (newtonPolyg, sizeOfNewtonPolygon, point) && k > 0) 810 { 811 k; 812 point [1]= k; 813 } 814 result [i]= k; 815 k= maxY; 816 delete [] point; 817 } 818 819 return result; 820 } 821 737 822 int 738 823 substituteCheck (const CanonicalForm& F, const Variable& x)
Note: See TracChangeset
for help on using the changeset viewer.