Changeset 1bc7201 in git for kernel/ideals.cc
- Timestamp:
- Oct 19, 2012, 6:38:35 PM (12 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- c879eea1669e963fb4c7287a3963abb287d00a49
- Parents:
- b37b3984a12e1552c7bafc9fd5a7849240ea79806bbe944402dfca102dcc3e036c4f2f119be41e44
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
r6bbe94 r1bc7201 130 130 } 131 131 132 133 /*3134 *multiplies p with t (!cas) or (t-1)135 *the index of t is:1, so we have to shift all variables136 *p is NOT in the actual ring, it has no t137 */138 static poly pMultWithT (poly p,BOOLEAN cas)139 {140 /*qp is the working pointer in p*/141 /*result is the result, qresult is the working pointer*/142 /*pp is p in the actual ring(shifted), qpp the working pointer*/143 poly result,qp,pp;144 poly qresult=NULL;145 poly qpp=NULL;146 int i,j,lex;147 number n;148 149 pp = NULL;150 result = NULL;151 qp = p;152 while (qp != NULL)153 {154 i = 0;155 if (result == NULL)156 {/*first monomial*/157 result = pInit();158 qresult = result;159 }160 else161 {162 qresult->next = pInit();163 pIter(qresult);164 }165 for (j=(currRing->N)-1; j>0; j--)166 {167 lex = pGetExp(qp,j);168 pSetExp(qresult,j+1,lex);/*copy all variables*/169 }170 lex = pGetComp(qp);171 pSetComp(qresult,lex);172 n=nCopy(pGetCoeff(qp));173 pSetCoeff0(qresult,n);174 qresult->next = NULL;175 pSetm(qresult);176 /*qresult is now qp brought into the actual ring*/177 if (cas)178 { /*case: mult with t-1*/179 pSetExp(qresult,1,0);180 pSetm(qresult);181 if (pp == NULL)182 { /*first monomial*/183 pp = pCopy(qresult);184 qpp = pp;185 }186 else187 {188 qpp->next = pCopy(qresult);189 pIter(qpp);190 }191 pGetCoeff(qpp)=nNeg(pGetCoeff(qpp));192 /*now qpp contains -1*qp*/193 }194 pSetExp(qresult,1,1);/*this is mult. by t*/195 pSetm(qresult);196 pIter(qp);197 }198 /*199 *now p is processed:200 *result contains t*p201 * if cas: pp contains -1*p (in the new ring)202 */203 if (cas) qresult->next = pp;204 /* else qresult->next = NULL;*/205 return result;206 }207 132 208 133 /*2 … … 850 775 } 851 776 852 BITSET save_verbose=verbose; 777 BITSET save2; 778 SI_SAVE_OPT2(save2); 853 779 854 780 k=si_max(1,(int)id_RankFreeModule(h1,currRing)); 855 781 856 if ((k==1) && (!lift3)) verbose|=Sy_bit(V_IDLIFT);782 if ((k==1) && (!lift3)) si_opt_2 |=Sy_bit(V_IDLIFT); 857 783 858 784 ring orig_ring = currRing; … … 974 900 975 901 if (syz_ring!=orig_ring) rDelete(syz_ring); 976 verbose = save_verbose;902 SI_RESTORE_OPT2(save2); 977 903 return s_h3; 978 904 } … … 1374 1300 } 1375 1301 h4->m[IDELEMS(h4)-1] = p; 1376 test|= Sy_bit(OPT_SB_1);1302 si_opt_1 |= Sy_bit(OPT_SB_1); 1377 1303 } 1378 1304 idDelete(&temph1); … … 1397 1323 return res; 1398 1324 } 1399 BITSET old_test=test; 1325 BITSET old_test1; 1326 SI_SAVE_OPT1(old_test1); 1400 1327 int i, kmax; 1401 1328 BOOLEAN addOnlyOne=TRUE; … … 1431 1358 s_h3 = kStd(s_h4,currQuotient,hom,&weights1,NULL,kmax-1); 1432 1359 } 1433 test = old_test;1360 SI_RESTORE_OPT1(old_test1); 1434 1361 #if 0 1435 1362 // only together with the above debug stuff … … 1672 1599 #if 1 1673 1600 //rWrite(tmpR);PrintLn(); 1674 BITSET save=test; 1675 //test |=1; 1601 //BITSET save1; 1602 //SI_SAVE_OPT1(save1); 1603 //si_opt_1 |=1; 1676 1604 //Print("h: %d gen, rk=%d\n",IDELEMS(h),h->rank); 1677 1605 //extern char * showOption(); 1678 1606 //Print("%s\n",showOption()); 1679 1607 hh = kStd(h,NULL,hom,&w,hilb); 1680 test=save;1608 //SI_RESTORE_OPT1(save1); 1681 1609 idDelete(&h); 1682 1610 #else … … 2194 2122 { 2195 2123 if ((s_temp1->m[i]!=NULL) 2196 && ( pGetComp(s_temp1->m[i])<=length))2124 && (((int)pGetComp(s_temp1->m[i]))<=length)) 2197 2125 { 2198 2126 p_Delete(&(s_temp1->m[i]),currRing);
Note: See TracChangeset
for help on using the changeset viewer.