Changeset 83aaa6 in git
- Timestamp:
- Mar 17, 2021, 8:22:32 PM (3 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- e8b6b3f6db0ff6cd2d7a2e771c5c2be12ce99ae9
- Parents:
- c833c00ba9e6eeaf106499a582ea5cd694a3cf45
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/graal.lib
rc833c0 r83aaa6 211 211 def origin = basering; 212 212 ring ringForGeneralPosition = create_ring(ringlist(basering)[1], "("+varstr(basering)+")", "lp", "no_minpoly"); 213 setring ringForGeneralPosition; 213 214 ideal m = fetch(origin,m); 214 215 newRing = 1; … … 361 362 { string pars; string vars = varstr(basering); } 362 363 ring Q0 = create_ring("("+charstr(basering)+pars+")", "("+vars+")", "dp"); 364 setring Q0; 363 365 ideal J0 = imap(Q,J); 364 366 Gr.Q0 = Q0; … … 430 432 **/ 431 433 ring KKy = create_ring(ringlist(Q0)[1], "("+string(l4)+","+varstr(Q0,nvars(Q0))+")", "(c,dp("+string(s)+"),dp(1))", "no_minpoly"); 434 setring KKy; 432 435 poly minpolyOfK = imap(Q0,g(n)); 433 436 qring Ky = std(minpolyOfK); -
Singular/ipassign.cc
rc833c0 r83aaa6 461 461 return FALSE; 462 462 } 463 static inline void jjCheck_FLAG_OTHER_RING(leftv res) 464 { 465 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 466 { 467 if ((res-1)->data!=currRing) 468 { 469 if ((res-1)->data!=NULL) 470 { 471 ring rr=(ring)(res-1)->data; 472 rr->ref--; 473 } 474 (res-1)->data=currRing; 475 (res-1)->rtyp=RING_CMD; 476 currRing->ref++; 477 } 478 } 479 } 463 480 static BOOLEAN jiA_NUMBER(leftv res, leftv a, Subexpr) 464 481 { 465 482 void *test_p=a->Data(); // can I access it (newstruct)? 466 483 if (errorreported) return TRUE; 467 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 468 { 469 (res-1)->data=currRing; 470 (res-1)->rtyp=RING_CMD; 471 } 484 jjCheck_FLAG_OTHER_RING(res); 472 485 number p=(number)a->CopyD(NUMBER_CMD); 473 486 if (res->data!=NULL) nDelete((number *)&res->data); … … 696 709 void *test_p=a->Data(); // can I access it (newstruct)? 697 710 if (errorreported) return TRUE; 698 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 699 { 700 (res-1)->data=currRing; 701 (res-1)->rtyp=RING_CMD; 702 } 711 jjCheck_FLAG_OTHER_RING(res); 703 712 syStrategy r=(syStrategy)a->CopyD(RESOLUTION_CMD); 704 713 if (res->data!=NULL) ((lists)res->data)->Clean(); … … 714 723 void *test_p=a->Data(); // can I access it (newstruct)? 715 724 if (errorreported) return TRUE; 716 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 717 { 718 (res-1)->data=currRing; 719 (res-1)->rtyp=RING_CMD; 720 } 725 // FLAG_OTHER_RING is only set for ring dep. types, so currRing!=NULL 726 jjCheck_FLAG_OTHER_RING(res); 721 727 lists l=(lists)a->CopyD(LIST_CMD); 722 728 if (res->data!=NULL) ((lists)res->data)->Clean(); … … 729 735 void *test_p=a->Data(); // can I access it (newstruct)? 730 736 if (errorreported) return TRUE; 731 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 732 { 733 (res-1)->data=currRing; 734 (res-1)->rtyp=RING_CMD; 735 } 737 jjCheck_FLAG_OTHER_RING(res); 736 738 poly p=(poly)a->CopyD(POLY_CMD); 737 739 pNormalize(p); … … 920 922 // there should be no assign bucket:=bucket, here we have poly:=bucket 921 923 { 922 if (Sy_inset(FLAG_OTHER_RING,res->flag))923 {924 (res-1)->data=currRing;925 (res-1)->rtyp=RING_CMD;926 }927 924 void *test_p=a->Data(); // can I access it (newstruct)? 928 925 if (errorreported) return TRUE; 926 jjCheck_FLAG_OTHER_RING(res); 929 927 sBucket_pt b=(sBucket_pt)a->CopyD(); 930 928 poly p; int l; … … 938 936 static BOOLEAN jiA_IDEAL(leftv res, leftv a, Subexpr) 939 937 { 940 if (Sy_inset(FLAG_OTHER_RING,res->flag))941 {942 (res-1)->data=currRing;943 (res-1)->rtyp=RING_CMD;944 }945 938 void *test_p=a->Data(); // can I access it (newstruct)? 946 939 if (errorreported) return TRUE; 940 jjCheck_FLAG_OTHER_RING(res); 947 941 if (res->data!=NULL) idDelete((ideal*)&res->data); 948 942 res->data=(void *)a->CopyD(MATRIX_CMD); … … 968 962 { 969 963 void *test_p=a->Data(); // can I access it (newstruct)? 970 if (Sy_inset(FLAG_OTHER_RING,res->flag))971 {972 (res-1)->data=currRing;973 (res-1)->rtyp=RING_CMD;974 }975 964 if (errorreported) return TRUE; 965 jjCheck_FLAG_OTHER_RING(res); 976 966 if (res->data!=NULL) syKillComputation((syStrategy)res->data); 977 967 res->data=(void *)a->CopyD(RESOLUTION_CMD); … … 983 973 { 984 974 void *test_p=a->Data(); // can I access it (newstruct)? 985 if (Sy_inset(FLAG_OTHER_RING,res->flag))986 {987 (res-1)->data=currRing;988 (res-1)->rtyp=RING_CMD;989 }990 975 if (errorreported) return TRUE; 976 jjCheck_FLAG_OTHER_RING(res); 991 977 if (res->data!=NULL) idDelete((ideal*)&res->data); 992 978 ideal I=idInit(1,1); … … 1006 992 void *test_p=a->Data(); // can I access it (newstruct)? 1007 993 if (errorreported) return TRUE; 1008 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 1009 { 1010 (res-1)->data=currRing; 1011 (res-1)->rtyp=RING_CMD; 1012 } 994 jjCheck_FLAG_OTHER_RING(res); 1013 995 if (res->data!=NULL) idDelete((ideal*)&res->data); 1014 996 matrix m=(matrix)a->CopyD(MATRIX_CMD); … … 1032 1014 void *test_p=a->Data(); // can I access it (newstruct)? 1033 1015 if (errorreported) return TRUE; 1034 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 1035 { 1036 (res-1)->data=currRing; 1037 (res-1)->rtyp=RING_CMD; 1038 } 1016 jjCheck_FLAG_OTHER_RING(res); 1039 1017 ideal m=(ideal)a->CopyD(MODUL_CMD); 1040 1018 if (m->rank>1) … … 1083 1061 void *test_p=a->Data(); // can I access it (newstruct)? 1084 1062 if (errorreported) return TRUE; 1085 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 1086 { 1087 (res-1)->data=currRing; 1088 (res-1)->rtyp=RING_CMD; 1089 } 1063 jjCheck_FLAG_OTHER_RING(res); 1090 1064 if (res->data!=NULL) 1091 1065 { … … 1103 1077 void *test_p=a->Data(); // can I access it (newstruct)? 1104 1078 if (errorreported) return TRUE; 1105 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 1106 { 1107 (res-1)->data=currRing; 1108 (res-1)->rtyp=RING_CMD; 1109 } 1079 jjCheck_FLAG_OTHER_RING(res); 1110 1080 map f=(map)res->data; 1111 1081 char *rn=f->preimage; // save the old/already assigned preimage ring name … … 1129 1099 void *test_p=a->Data(); // can I access it (newstruct)? 1130 1100 if (errorreported) return TRUE; 1131 if (Sy_inset(FLAG_OTHER_RING,res->flag)) 1132 { 1133 (res-1)->data=currRing; 1134 (res-1)->rtyp=RING_CMD; 1135 } 1101 jjCheck_FLAG_OTHER_RING(res); 1136 1102 1137 1103 ring old_ring=(ring)res->Data(); -
Singular/newstruct.cc
rc833c0 r83aaa6 396 396 } 397 397 } 398 398 else if (al->m[nm->pos-1].data!=currRing) 399 399 { 400 400 // object is not from currRing, so mark it for "write-only": 401 401 al->m[nm->pos].flag|=Sy_bit(FLAG_OTHER_RING); 402 402 //Print("checking ring at pos %d for dat at pos %d\n",nm->pos-1,nm->pos); 403 403 } 404 404 else 405 405 { … … 409 409 } 410 410 //if(al->m[nm->pos-1].data==NULL) 411 411 { 412 412 // remember the ring, if not already set 413 413 if (currRing!=NULL) 414 415 414 { 415 currRing->ref++; 416 416 al->m[nm->pos-1].data=(void *)currRing; 417 417 al->m[nm->pos-1].rtyp=RING_CMD; 418 418 } 419 419 } 420 420 } 421 421 else if ((nm->typ==DEF_CMD)||(nm->typ==LIST_CMD)) -
kernel/polys.cc
rc833c0 r83aaa6 255 255 &&(convSingTrP(I->m[i],r)) 256 256 &&(convSingTrP(q,r)) 257 257 &&(!rIsNCRing(r))) 258 258 { 259 259 h=singclap_pdivide(I->m[i],q,r); … … 261 261 else if ((r->cf->convSingNFactoryN!=ndConvSingNFactoryN) 262 262 &&(!rField_is_Ring(r)) 263 263 &&(!rIsNCRing(r))) 264 264 h=singclap_pdivide(I->m[i],q,r); 265 265 else
Note: See TracChangeset
for help on using the changeset viewer.