Changeset cc6544 in git
- Timestamp:
- Dec 12, 2013, 1:43:48 PM (9 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d11734c14946aacc7d00348d000a1bb22c618823
- Parents:
- 1eba3916d70fdfa610391e2779d72b202c1b7915
- git-author:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-12 13:43:48+01:00
- git-committer:
- Christian Eder <ederc@mathematik.uni-kl.de>2013-12-12 13:51:29+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kstd2.cc
r1eba39 rcc6544 53 53 #endif 54 54 55 #define SBA_INTERRED_START 0 55 56 #define SBA_TAIL_RED 1 56 57 #define SBA_PRODUCT_CRITERION 0 … … 1715 1716 for (int i=0; i<sort->length();++i) 1716 1717 F->m[i] = F1->m[(*sort)[i]-1]; 1718 #if SBA_INTERRED_START 1719 F = kInterRed(F,NULL); 1720 #endif 1717 1721 #if F5DEBUG 1718 1722 printf("SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n"); … … 2104 2108 // the corresponding principal syzygy 2105 2109 // => we do not need to compute the "real" syzygy completely 2106 poly help = p Copy(strat->sig[ps]);2110 poly help = p_Copy(strat->sig[ps],currRing); 2107 2111 p_ExpVectorAdd (help,strat->P.p,currRing); 2108 2112 Q.sig = p_Add_q(Q.sig,help,currRing); … … 2117 2121 // deg - idx - lp/rp 2118 2122 // => we need to add syzygies with indices > pGetComp(strat->P.sig) 2119 if(strat->sbaOrder == 3)2123 if(strat->sbaOrder == 0 || strat->sbaOrder == 3) 2120 2124 { 2121 2125 int cmp = pGetComp(strat->P.sig); … … 2125 2129 LObject Q; 2126 2130 int pos; 2127 for (int i=cmp+1; i<=max_cmp; ++i) { 2128 Q.sig = p_One(currRing); 2129 p_SetExpV(Q.sig, vv, currRing); 2130 // F->m[i-1] corresponds to index i 2131 p_ExpVectorAdd(Q.sig,F->m[i-1],currRing); 2132 p_SetComp(Q.sig, i, currRing); 2133 pos = posInSyz(strat, Q.sig); 2134 enterSyz(Q, strat, pos); 2135 } 2136 } 2137 #if 1 2138 //#if DEBUGF50 2131 int idx = p_GetComp(strat->P.sig,currRing); 2132 //printf("++ -- adding syzygies -- ++\n"); 2133 // if new element is the first one in this index 2134 if (strat->currIdx < idx) { 2135 for (int i=0; i<strat->sl; ++i) { 2136 Q.sig = p_Copy(strat->P.sig,currRing); 2137 p_ExpVectorAdd(Q.sig,strat->S[i],currRing); 2138 poly help = p_Copy(strat->sig[i],currRing); 2139 p_ExpVectorAdd(help,strat->P.p,currRing); 2140 Q.sig = p_Add_q(Q.sig,help,currRing); 2141 //pWrite(Q.sig); 2142 pos = posInSyz(strat, Q.sig); 2143 enterSyz(Q, strat, pos); 2144 } 2145 strat->currIdx = idx; 2146 } else { 2147 // if the element is not the first one in the given index we build all 2148 // possible syzygies with elements of higher index 2149 for (int i=cmp+1; i<=max_cmp; ++i) { 2150 pos = -1; 2151 for (int j=0; j<strat->sl; ++j) { 2152 if (p_GetComp(strat->sig[j],currRing) == i) { 2153 pos = j; 2154 break; 2155 } 2156 } 2157 if (pos != -1) { 2158 Q.sig = p_One(currRing); 2159 p_SetExpV(Q.sig, vv, currRing); 2160 // F->m[i-1] corresponds to index i 2161 p_ExpVectorAdd(Q.sig,F->m[i-1],currRing); 2162 p_SetComp(Q.sig, i, currRing); 2163 poly help = p_Copy(strat->P.sig,currRing); 2164 p_ExpVectorAdd(help,strat->S[pos],currRing); 2165 Q.sig = p_Add_q(Q.sig,help,currRing); 2166 if (p_LmCmp(Q.sig,strat->syz[strat->syzl-1],currRing) == -currRing->OrdSgn) { 2167 pos = posInSyz(strat, Q.sig); 2168 enterSyz(Q, strat, pos); 2169 } 2170 } 2171 } 2172 //printf("++ -- done adding syzygies -- ++\n"); 2173 } 2174 } 2175 //#if 1 2176 #if DEBUGF50 2139 2177 printf("---------------------------\n"); 2140 2178 Print(" %d. ELEMENT ADDED TO GCURR:\n",strat->sl+1); … … 2184 2222 int pos = posInSyz(strat, strat->P.sig); 2185 2223 enterSyz(strat->P, strat, pos); 2186 #if 12187 //#ifdef DEBUGF52224 //#if 1 2225 #ifdef DEBUGF5 2188 2226 Print("ADDING STUFF TO SYZ : "); 2189 2227 //pWrite(strat->P.p);
Note: See TracChangeset
for help on using the changeset viewer.