Changeset 02c60e in git
- Timestamp:
- Oct 5, 2017, 7:29:32 PM (7 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 88148a1de1b5b71e266c95fd5fa98d9bba5edd6f
- Parents:
- 2b968fa27bc9c56858aeeaf4cca475d621c80fc3
- git-author:
- Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-10-05 19:29:32+02:00
- git-committer:
- Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-12-15 12:17:07+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/syz4.cc
r2b968f r02c60e 76 76 #define delete_lts_hash(C) C->clear() 77 77 78 poly FindReducer(const poly multiplier, const poly t, const lts_hash *m_div) 79 { 80 const ring r = currRing; 81 lts_hash::const_iterator m_itr = m_div->find(p_GetComp(t, currRing)); 82 if (m_itr == m_div->end()) { 78 poly find_reducer(const poly multiplier, const poly t, 79 const lts_hash *hash_previous_module) 80 { 81 const ring r = currRing; 82 lts_hash::const_iterator m_itr = hash_previous_module->find(p_GetComp(t, 83 currRing)); 84 if (m_itr == hash_previous_module->end()) { 83 85 return NULL; 84 86 } 85 87 lts_vector::const_iterator m_current = (m_itr->second).begin(); 86 lts_vector::const_iterator m_finish 88 lts_vector::const_iterator m_finish = (m_itr->second).end(); 87 89 const poly q = p_New(r); 88 90 pNext(q) = NULL; … … 106 108 } 107 109 108 static poly TraverseTail_test(poly multiplier, const int tail,110 static poly traverse_tail(poly multiplier, const int tail, 109 111 const ideal previous_module, const std::vector<bool> &variables, 110 const lts_hash * m_div);111 112 static inline poly ReduceTerm_test(poly multiplier, poly term4reduction,112 const lts_hash *hash_previous_module); 113 114 static inline poly reduce_term(poly multiplier, poly term4reduction, 113 115 const ideal previous_module, const std::vector<bool> &variables, 114 const lts_hash * m_div)115 { 116 const ring r = currRing; 117 poly s = FindReducer(multiplier, term4reduction, m_div);116 const lts_hash *hash_previous_module) 117 { 118 const ring r = currRing; 119 poly s = find_reducer(multiplier, term4reduction, hash_previous_module); 118 120 if( s == NULL ) 119 121 { … … 121 123 } 122 124 const int c = p_GetComp(s, r) - 1; 123 const poly t = TraverseTail_test(s, c, previous_module, variables, m_div); 125 const poly t = traverse_tail(s, c, previous_module, variables, 126 hash_previous_module); 124 127 if( t != NULL ) 125 128 s = p_Add_q(s, t, r); … … 127 130 } 128 131 129 static poly ComputeImage_test(poly multiplier, const int t,132 static poly compute_image(poly multiplier, const int t, 130 133 const ideal previous_module, const std::vector<bool> &variables, 131 const lts_hash * m_div)134 const lts_hash *hash_previous_module) 132 135 { 133 136 const poly tail = previous_module->m[t]->next; … … 141 144 for(poly p = tail; p != NULL; p = pNext(p)) // iterate over the tail 142 145 { 143 const poly rt = ReduceTerm_test(multiplier, p, previous_module,144 variables, m_div);146 const poly rt = reduce_term(multiplier, p, previous_module, 147 variables, hash_previous_module); 145 148 sBucket_Add_p(sum, rt, pLength(rt)); 146 149 } … … 187 190 #endif // CACHE 188 191 189 static poly TraverseTail_test(poly multiplier, const int tail,192 static poly traverse_tail(poly multiplier, const int tail, 190 193 const ideal previous_module, const std::vector<bool> &variables, 191 const lts_hash * m_div)194 const lts_hash *hash_previous_module) 192 195 { 193 196 const ring& r = currRing; … … 212 215 return p; 213 216 } 214 const poly p = ComputeImage_test(multiplier, tail, previous_module,215 variables, m_div);217 const poly p = compute_image(multiplier, tail, previous_module, 218 variables, hash_previous_module); 216 219 itr = T.find(multiplier); 217 220 if( itr == T.end() ) … … 224 227 } 225 228 #endif // CACHE 226 const poly p = ComputeImage_test(multiplier, tail, previous_module,227 variables, m_div);229 const poly p = compute_image(multiplier, tail, previous_module, variables, 230 hash_previous_module); 228 231 #if CACHE 229 232 top_itr = m_cache_test.find(tail); … … 251 254 252 255 static poly lift_ext_LT(const poly a, const ideal previous_module, 253 const std::vector<bool> &variables, const lts_hash *m_div) 256 const std::vector<bool> &variables, 257 const lts_hash *hash_previous_module) 254 258 { 255 259 const ring R = currRing; 256 poly t1 = ComputeImage_test(a, p_GetComp(a, R)-1,257 previous_module, variables, m_div);258 poly t2 = TraverseTail_test(a->next, p_GetComp(a->next, R)-1,259 previous_module, variables, m_div);260 poly t1 = compute_image(a, p_GetComp(a, R)-1, previous_module, variables, 261 hash_previous_module); 262 poly t2 = traverse_tail(a->next, p_GetComp(a->next, R)-1, previous_module, 263 variables, hash_previous_module); 260 264 t1 = p_Add_q(t1, t2, R); 261 265 return t1;
Note: See TracChangeset
for help on using the changeset viewer.