Changeset 7766a9 in git
- Timestamp:
- Aug 14, 2013, 5:08:33 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 252584af9fd5177071832c030eb4a9417734422e
- Parents:
- 09dbf32a73ab559fc399380625e62d872c92c45b
- git-author:
- Martin Lee <martinlee84@web.de>2013-08-14 17:08:33+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2013-08-30 13:48:30+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facAbsFact.cc
r09dbf3 r7766a9 133 133 } 134 134 135 CFList evalPoints4AbsFact (const CanonicalForm& F, CFList& eval, Evaluation& E) 135 CFList 136 evalPoints4AbsFact (const CanonicalForm& F, CFList& eval, Evaluation& E, 137 int& intervalSize) 136 138 { 137 139 CFList result; 138 140 Variable x= Variable (1); 141 142 CanonicalForm LCF= LC (F, x); 143 CFList LCFeval= CFList(); 139 144 140 145 bool found= false; … … 144 149 CFFList uniFactors; 145 150 CFListIterator iter; 151 int count= 0; 146 152 do 147 153 { 154 count++; 155 if (count==E.max() - E.min() + 1) 156 { 157 count= 1; 158 intervalSize++; 159 E= REvaluation (E.min(), E.max(), IntRandom (intervalSize)); 160 E.nextpoint(); 161 } 148 162 eval.insert (F); 163 LCFeval.insert (LCF); 149 164 bool bad= false; 150 165 for (int i= E.max(); i >= E.min(); i--) 151 166 { 152 167 eval.insert (eval.getFirst()( E [i], i)); 168 LCFeval.insert (LCFeval.getFirst()( E [i], i)); 153 169 result.append (E[i]); 154 170 if (!E[i].isZero()) … … 160 176 result= CFList(); 161 177 eval= CFList(); 178 LCFeval= CFList(); 162 179 bad= true; 163 180 foundZero= false; … … 167 184 { 168 185 result= CFList(); 186 LCFeval= CFList(); 169 187 eval= CFList(); 170 188 bad= true; 171 189 break; 172 190 } 191 if ((i != 2) && (degree (LCFeval.getFirst(), i-1) != degree (LCF, i-1))) 192 { 193 result= CFList(); 194 LCFeval= CFList(); 195 eval= CFList(); 196 bad= true; 197 break; 198 } 173 199 } 174 200 … … 183 209 result= CFList(); 184 210 eval= CFList(); 211 LCFeval= CFList(); 185 212 E.nextpoint(); 186 213 continue; … … 193 220 result= CFList(); 194 221 eval= CFList(); 222 LCFeval= CFList(); 195 223 E.nextpoint(); 196 224 continue; … … 203 231 result= CFList(); 204 232 eval= CFList(); 233 LCFeval= CFList(); 205 234 E.nextpoint(); 206 235 continue; … … 213 242 result= CFList(); 214 243 eval= CFList(); 244 LCFeval= CFList(); 215 245 E.nextpoint(); 216 246 continue; … … 316 346 // several bivariate factorizations 317 347 TIMING_START (abs_fac_bifactor_total); 318 REvaluation E (2, A.level(), IntRandom (25)); 348 int absValue= 2; 349 REvaluation E (2, A.level(), IntRandom (absValue)); 319 350 for (int i= 0; i < factorNums; i++) 320 351 { … … 323 354 bufAeval= CFList(); 324 355 TIMING_START (abs_fac_evaluation); 325 bufEvaluation= evalPoints4AbsFact (bufA, bufAeval, E );356 bufEvaluation= evalPoints4AbsFact (bufA, bufAeval, E, absValue); 326 357 TIMING_END_AND_PRINT (abs_fac_evaluation, 327 358 "time to find evaluation point in abs fact: ");
Note: See TracChangeset
for help on using the changeset viewer.