Changeset dd668f in git
- Timestamp:
- Mar 21, 2012, 6:48:05 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- bcfd11a55d73c58524f3c5043376c6d7147cb690
- Parents:
- f630e4e0ae481c82576fce09c99655b85d5e04e8
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-21 18:48:05+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-23 16:06:34+01:00
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
rf630e4 rdd668f 3539 3539 mipo_id->m[i]=p; 3540 3540 } 3541 new_ring-> minideal=id_Copy(alg_ring->qideal,new_ring);3541 new_ring->qideal=id_Copy(alg_ring->qideal,new_ring); 3542 3542 // convert factors ============================================= 3543 3543 ideal fac_id=idInit(L.length(),1); -
Singular/iparith.cc
rf630e4 rdd668f 3620 3620 #ifdef HAVE_FACTORY 3621 3621 extern int ipower ( int b, int n ); /* factory/cf_util */ 3622 elems=ipower(r->cf->ch,r->cf->extRing->pFDeg(r->cf->extRing-> minideal->m[0],r->cf->extRing));3622 elems=ipower(r->cf->ch,r->cf->extRing->pFDeg(r->cf->extRing->qideal->m[0],r->cf->extRing)); 3623 3623 #else 3624 elems=(int)pow((double) r->cf->ch,(double)r->cf->extRing->pFDeg(r->cf->extRing-> minideal->m[0],r->cf->extRing));3624 elems=(int)pow((double) r->cf->ch,(double)r->cf->extRing->pFDeg(r->cf->extRing->qideal->m[0],r->cf->extRing)); 3625 3625 #endif 3626 3626 } -
Singular/ipshell.cc
rf630e4 rdd668f 1658 1658 else 1659 1659 { 1660 ideal q=idInit(IDELEMS(r-> minideal));1660 ideal q=idInit(IDELEMS(r->qideal)); 1661 1661 q->m[0]=p_Init(R); 1662 pSetCoeff0(q->m[0],(number)(r-> minideal->m[0]));1662 pSetCoeff0(q->m[0],(number)(r->qideal->m[0])); 1663 1663 L->m[3].data=(void *)q; 1664 1664 // I->m[0] = pNSet(R->minpoly); … … 2473 2473 BITSET save_test=test; 2474 2474 2475 // if ((orig_ring->minpoly != NULL) || (orig_ring-> minideal != NULL))2475 // if ((orig_ring->minpoly != NULL) || (orig_ring->qideal != NULL)) 2476 2476 // naSetChar(rInternalChar(orig_ring),orig_ring); 2477 2477 // else ntSetChar(rInternalChar(orig_ring),orig_ring); -
Singular/silink.cc
rf630e4 rdd668f 779 779 { 780 780 StringSetS(""); 781 p_Write(IDRING(h)->cf->extRing-> minideal->m[0],IDRING(h)->cf->extRing);781 p_Write(IDRING(h)->cf->extRing->qideal->m[0],IDRING(h)->cf->extRing); 782 782 rhs = StringAppendS(""); 783 783 if (fprintf(fd, "; minpoly = %s", rhs) == EOF) return EOF; -
Singular/subexpr.cc
rf630e4 rdd668f 634 634 635 635 assume( A != NULL ); 636 assume( A-> minideal != NULL );637 638 x=(void *)p_Copy(A-> minideal->m[0], A);636 assume( A->qideal != NULL ); 637 638 x=(void *)p_Copy(A->qideal->m[0], A); 639 639 } 640 640 data=NULL; … … 1054 1054 1055 1055 assume( A != NULL ); 1056 assume( A-> minideal != NULL );1057 1058 return (void *)A-> minideal->m[0];1056 assume( A->qideal != NULL ); 1057 1058 return (void *)A->qideal->m[0]; 1059 1059 } 1060 1060 else -
Singular/walk.cc
rf630e4 rdd668f 1951 1951 // if (rParameter (currRing)!=NULL) 1952 1952 // { 1953 // res->cf->extRing-> minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0],currRing->cf->extRing);1953 // res->cf->extRing->qideal->m[0]=p_Copy(currRing->cf->extRing->qideal->m[0],currRing->cf->extRing); 1954 1954 // int l=rPar(currRing); 1955 1955 // … … 2034 2034 // if (rParameter (currRing)!=NULL) 2035 2035 // { 2036 // r->cf->extRing-> minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0], currRing->cf->extRing);2036 // r->cf->extRing->qideal->m[0]=p_Copy(currRing->cf->extRing->qideal->m[0], currRing->cf->extRing); 2037 2037 // int l=rPar(currRing); 2038 2038 // r->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr)); … … 2082 2082 // if (rParameter(currRing)!=NULL) 2083 2083 // { 2084 // r->cf->extRing-> minideal->m[0]=p_Copy(currRing->cf->extRing->minideal->m[0], currRing->cf->extRing);2084 // r->cf->extRing->qideal->m[0]=p_Copy(currRing->cf->extRing->qideal->m[0], currRing->cf->extRing); 2085 2085 // int l=rPar(currRing); 2086 2086 // r->cf->extRing->names=(char **)omAlloc(l*sizeof(char_ptr)); -
libpolys/coeffs/coeffWrite
rf630e4 rdd668f 64 64 PrintS("...\n"); 65 65 } 66 if (r-> minideal!=NULL)66 if (r->qideal!=NULL) 67 67 { 68 if (r==currRing) iiWriteMatrix((matrix)r-> minideal,"// minpolys",1,r,0);68 if (r==currRing) iiWriteMatrix((matrix)r->qideal,"// minpolys",1,r,0); 69 69 else PrintS("// minpolys=..."); 70 70 PrintLn(); -
libpolys/coeffs/coeffs.h
rf630e4 rdd668f 237 237 238 238 //number minpoly; //< no longer needed: replaced by 239 // //< extRing-> minideal->[0]239 // //< extRing->qideal->[0] 240 240 241 241 -
libpolys/polys/clapconv.cc
rf630e4 rdd668f 290 290 if (a!=NULL) 291 291 { 292 if (r->cf->extRing-> minideal->m[0]!=NULL)293 { 294 poly l=r->cf->extRing-> minideal->m[0];292 if (r->cf->extRing->qideal->m[0]!=NULL) 293 { 294 poly l=r->cf->extRing->qideal->m[0]; 295 295 if (p_GetExp(a,1,r->cf->extRing) >= p_GetExp(l,1,r->cf->extRing)) 296 296 a = p_PolyDiv (a, l, FALSE, r->cf->extRing); -
libpolys/polys/clapsing.cc
rf630e4 rdd668f 75 75 if ( rField_is_Q_a(r)) setCharacteristic( 0 ); 76 76 else setCharacteristic( rChar(r) ); 77 if (r->cf->extRing-> minideal!=NULL)77 if (r->cf->extRing->qideal!=NULL) 78 78 { 79 79 bool b1=isOn(SW_USE_QGCD); … … 81 81 if ( rField_is_Q_a(r) ) On(SW_USE_QGCD); 82 82 else On(SW_USE_fieldGCD); 83 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing-> minideal->m[0],83 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 84 84 r->cf->extRing); 85 85 Variable a=rootOf(mipo); … … 160 160 else setCharacteristic( rChar(r) ); 161 161 Variable X(i+rPar(r)); 162 if (r->cf->extRing-> minideal!=NULL)162 if (r->cf->extRing->qideal!=NULL) 163 163 { 164 164 //Variable X(i); 165 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing-> minideal->m[0],165 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 166 166 r->cf->extRing); 167 167 Variable a=rootOf(mipo); … … 306 306 else setCharacteristic( rChar(r) ); 307 307 CanonicalForm Fa,Gb; 308 if (r->cf->extRing-> minideal!=NULL)309 { 310 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing-> minideal->m[0],308 if (r->cf->extRing->qideal!=NULL) 309 { 310 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 311 311 r->cf->extRing); 312 312 Variable a=rootOf(mipo); … … 374 374 if (rField_is_Q_a(r)) setCharacteristic( 0 ); 375 375 else setCharacteristic( rChar(r) ); 376 if (r->cf->extRing-> minideal!=NULL)377 { 378 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing-> minideal->m[0],376 if (r->cf->extRing->qideal!=NULL) 377 { 378 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 379 379 r->cf->extRing); 380 380 Variable a=rootOf(mipo); … … 530 530 else if (rField_is_Extension(r)) 531 531 { 532 if (r->cf->extRing-> minideal!=NULL)533 { 534 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing-> minideal->m[0],532 if (r->cf->extRing->qideal!=NULL) 533 { 534 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 535 535 r->cf->extRing); 536 536 a=rootOf(mipo); … … 563 563 else if (rField_is_Extension(r)) 564 564 { 565 if (r->cf->extRing-> minideal!=NULL)565 if (r->cf->extRing->qideal!=NULL) 566 566 { 567 567 q= convFactoryAPSingAP( Q,r ); … … 733 733 if (rField_is_Q_a (r)) setCharacteristic (0); 734 734 else setCharacteristic( rChar(r) ); 735 if (r->cf->extRing-> minideal!=NULL)736 { 737 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing-> minideal->m[0],735 if (r->cf->extRing->qideal!=NULL) 736 { 737 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 738 738 r->cf->extRing); 739 739 Variable a=rootOf(mipo); … … 795 795 intvec *w=NULL; 796 796 if (v!=NULL) w=*v; 797 if (r->cf->extRing-> minideal==NULL)797 if (r->cf->extRing->qideal==NULL) 798 798 { 799 799 if(!count_Factors(res,w,j,ff,convFactoryPSingTrP( J.getItem().factor(),r ),r)) … … 927 927 } 928 928 } 929 if (rField_is_Q_a(r) && (r->cf->extRing-> minideal!=NULL))929 if (rField_is_Q_a(r) && (r->cf->extRing->qideal!=NULL)) 930 930 { 931 931 int i=IDELEMS(res)-1; … … 1091 1091 if (rField_is_Q_a (r)) setCharacteristic (0); 1092 1092 else setCharacteristic( rChar(r) ); 1093 if (r->cf->extRing-> minideal!=NULL)1094 { 1095 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing-> minideal->m[0],1093 if (r->cf->extRing->qideal!=NULL) 1094 { 1095 CanonicalForm mipo=convSingPFactoryP(r->cf->extRing->qideal->m[0], 1096 1096 r->cf->extRing); 1097 1097 Variable a=rootOf(mipo); … … 1153 1153 else if (rField_is_Extension(r)) /* Q(a), Fp(a) */ 1154 1154 { 1155 if (r->cf->extRing-> minideal==NULL)1155 if (r->cf->extRing->qideal==NULL) 1156 1156 res->m[j]=convFactoryPSingTrP( J.getItem().factor(),r ); 1157 1157 else … … 1170 1170 } 1171 1171 } 1172 if (rField_is_Q_a(r) && (r->cf->extRing-> minideal!=NULL))1172 if (rField_is_Q_a(r) && (r->cf->extRing->qideal!=NULL)) 1173 1173 { 1174 1174 int i=IDELEMS(res)-1; -
libpolys/polys/ext_fields/algext.cc
rf630e4 rdd668f 14 14 * towers). 15 15 * 2.) Moreover, this implementation assumes that 16 * cf->extRing-> minideal is not NULL but an ideal with at16 * cf->extRing->qideal is not NULL but an ideal with at 17 17 * least one non-zero generator which may be accessed by 18 * cf->extRing-> minideal->m[0] and which represents the minimal18 * cf->extRing->qideal->m[0] and which represents the minimal 19 19 * polynomial f(a) of the extension variable 'a' in K[a]. 20 20 * 3.) As soon as an std method for polynomial rings becomes … … 73 73 74 74 /* minimal polynomial */ 75 #define naMinpoly naRing-> minideal->m[0]75 #define naMinpoly naRing->qideal->m[0] 76 76 77 77 /// forward declarations … … 321 321 PrintLn(); 322 322 323 const ideal I = A-> minideal;323 const ideal I = A->qideal; 324 324 325 325 assume( I != NULL ); … … 343 343 Print("// Coefficients live in the extension field K[%s]/<f(%s)>\n", x, x); 344 344 Print("// with the minimal polynomial f(%s) = %s\n", x, 345 p_String(A-> minideal->m[0], A));345 p_String(A->qideal->m[0], A)); 346 346 PrintS("// and K: "); 347 347 */ … … 555 555 if( rEqual(naRing, e->r, TRUE) ) 556 556 { 557 const ideal mi = naRing-> minideal;557 const ideal mi = naRing->qideal; 558 558 assume( IDELEMS(mi) == 1 ); 559 559 ideal ii = e->i; … … 835 835 (e->i->m[0] != NULL) ); // at m[0]; 836 836 837 assume( e->r-> minideal == NULL );837 assume( e->r->qideal == NULL ); 838 838 839 839 assume( cf != NULL ); … … 844 844 R->ref ++; // increase the ref.counter for the ground poly. ring! 845 845 846 R-> minideal = e->i; // make a copy?846 R->qideal = e->i; // make a copy? 847 847 848 848 cf->extRing = R; -
libpolys/polys/ext_fields/algext.h
rf630e4 rdd668f 16 16 * towers). 17 17 * 2.) Moreover, this implementation assumes that 18 * cf->extRing-> minideal is not NULL but an ideal with at18 * cf->extRing->qideal is not NULL but an ideal with at 19 19 * least one non-zero generator which may be accessed by 20 * cf->extRing-> minideal->m[0] and which represents the minimal20 * cf->extRing->qideal->m[0] and which represents the minimal 21 21 * polynomial f(a) of the extension variable 'a' in K[a]. 22 22 * 3.) As soon as an std method for polynomial rings becomes -
libpolys/polys/ext_fields/transext.cc
rf630e4 rdd668f 477 477 Print("%s ", rRingVar(nop, A)); 478 478 479 assume( A-> minideal == NULL );479 assume( A->qideal == NULL ); 480 480 481 481 PrintS("\n// minpoly : 0\n"); … … 1413 1413 assume( e->r != NULL); // extRing; 1414 1414 assume( e->r->cf != NULL); // extRing->cf; 1415 assume( e->r-> minideal == NULL );1415 assume( e->r->qideal == NULL ); 1416 1416 1417 1417 assume( cf != NULL ); -
libpolys/polys/monomials/ring.cc
rf630e4 rdd668f 305 305 StringSetS(""); n_Write(r->cf->minpoly, r); PrintS(StringAppendS("\n")); 306 306 } 307 //if (r-> minideal!=NULL)307 //if (r->qideal!=NULL) 308 308 //{ 309 // iiWriteMatrix((matrix)r-> minideal,"// minpolys",1,r,0);309 // iiWriteMatrix((matrix)r->qideal,"// minpolys",1,r,0); 310 310 // PrintLn(); 311 311 //} … … 828 828 else if (nCoeff_is_Extension(r2->cf) && rChar(r2) == rChar(r1)) 829 829 { 830 /*AlgExtInfo extParam; 831 extParam.r = r2->cf->extRing; 832 extParam.i = r2->cf->extRing->qideal;*/ 830 833 tmpR.cf=r2->cf; 831 834 r2->cf->ref++; … … 1446 1449 1447 1450 res->extRing=r->extRing; 1448 //memset: res-> minideal=NULL;1451 //memset: res->qideal=NULL; 1449 1452 */ 1450 1453 … … 1590 1593 1591 1594 res->extRing=r->extRing; 1592 //memset: res-> minideal=NULL;1595 //memset: res->qideal=NULL; 1593 1596 */ 1594 1597 … … 2129 2132 2130 2133 if (!rMinpolyIsNULL(r)) 2131 omCheckAddr(r->cf->extRing-> minideal->m[0]);2134 omCheckAddr(r->cf->extRing->qideal->m[0]); 2132 2135 2133 2136 //assume(r->cf!=NULL); … … 5634 5637 assume(C != NULL); 5635 5638 5636 const BOOLEAN ret = nCoeff_is_algExt(C); 5639 const BOOLEAN ret = nCoeff_is_algExt(C); // || nCoeff_is_GF(C) || nCoeff_is_long_C(C); 5637 5640 5638 5641 if( ret ) … … 5640 5643 const ring R = C->extRing; 5641 5644 assume( R != NULL ); 5642 assume( !idIs0(R->minideal) ); 5643 } 5644 5645 assume( !idIs0(R->qideal) ); 5646 } 5647 5648 // TODO: it should be "!ret" but it'd lead to test fails (due to rDecompose?) 5645 5649 return ret; 5646 5650 } -
libpolys/polys/monomials/ring.h
rf630e4 rdd668f 210 210 int* block1; /* ending pos., rInit/rSleftvOrdering2Ordering*/ 211 211 // char** parameter; /* names of parameters, rInit */ 212 // number minpoly; /* replaced by minideal->m[0] */213 ideal minideal; /* for Q_a/Zp_a, rInit;214 for a start, we assume that there is either no215 or exactly one generator in minideal, playing216 the role of the former minpoly; minideal may217 also be NULL which coincides with the218 no-generator-case */219 212 int** wvhdl; /* array of weight vectors, rInit/rSleftvOrdering2Ordering */ 220 213 char ** names; /* array of variable names, rInit */ … … 233 226 int* VarOffset; 234 227 235 ideal qideal; /* extension to the ring structure: qring, rInit */ 228 // ideal minideal; 229 // number minpoly; /* replaced by minideal->m[0] */ 230 ideal qideal; /**< extension to the ring structure: qring, rInit, OR 231 for Q_a/Zp_a, rInit (replaces minideal!); 232 for a start, we assume that there is either no 233 or exactly one generator in minideal, playing 234 the role of the former minpoly; minideal may 235 also be NULL which coincides with the 236 no-generator-case **/ 236 237 237 238 int* firstwv;
Note: See TracChangeset
for help on using the changeset viewer.