Changeset b71400a in git for Singular/dyn_modules/gfanlib/tropicalStrategy.h
- Timestamp:
- Sep 15, 2014, 11:08:21 AM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- dffd1541cc74564f509bd5d284948852484430b0
- Parents:
- 9c03260ac0404405e4994f73b30ef46f079535d8
- git-author:
- Yue Ren <ren@mathematik.uni-kl.de>2014-09-15 11:08:21+02:00
- git-committer:
- Yue Ren <ren@mathematik.uni-kl.de>2015-02-06 13:47:05+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/gfanlib/tropicalStrategy.h
r9c0326 rb71400a 91 91 bool (*extraReductionAlgorithm) (ideal I, ring r, number p); 92 92 93 ring copyAndChangeCoefficientRing(const ring r) const; 94 ring copyAndChangeOrderingWP(const ring r, const gfan::ZVector w, const gfan::ZVector v) const; 95 ring copyAndChangeOrderingLS(const ring r, const gfan::ZVector w, const gfan::ZVector v) const; 96 97 /** 98 * if valuation non-trivial, checks whether the generating system contains p-t 99 * otherwise returns true 100 */ 101 bool checkForUniformizingBinomial(const ideal I, const ring r) const; 102 103 /** 104 * if valuation non-trivial, checks whether the genearting system contains p 105 * otherwise returns true 106 */ 107 bool checkForUniformizingParameter(const ideal inI, const ring r) const; 108 int findPositionOfUniformizingBinomial(const ideal I, const ring r) const; 109 void putUniformizingBinomialInFront(ideal I, const ring r, const number q) const; 110 111 93 112 public: 94 113 … … 154 173 ring getStartingRing() const 155 174 { 156 rTest(startingRing);175 if (startingRing) rTest(startingRing); 157 176 return startingRing; 158 177 } … … 186 205 ring getShortcutRing() const 187 206 { 188 rTest(shortcutRing);207 if (shortcutRing) rTest(shortcutRing); 189 208 return shortcutRing; 190 209 } … … 258 277 void changeCoefficientToResidueField(ring r) const; 259 278 260 261 262 279 /** 263 280 * reduces the generators of an ideal I so that … … 265 282 */ 266 283 bool reduce(ideal I, const ring r) const; 284 285 bool pReduce(ideal I, const ring r) const; 267 286 268 287 /** … … 292 311 * computes the groebner cone adjacent to it 293 312 */ 294 std::pair<ideal,ring> getFlip(const ideal I, const ring r, const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal) const; 295 296 /** 297 * checks whether the first elements of I is p-t 298 */ 299 static bool checkFirstGenerator(ideal I, ring r) 300 { 301 // check for correct size of ideal and first generator 302 if (idSize(I)==0) 303 { 304 WerrorS("checkFirstElement: ideal empty"); 305 return false; 306 } 307 poly p = I->m[0]; 308 if (size(p)!=2) 309 { 310 WerrorS("checkFirstElement: no binomial"); 311 return false; 312 } 313 314 // check first term 315 int n = rVar(r); 316 if (!n_IsUnit(p_GetCoeff(p,r->cf),r->cf)) 317 { 318 WerrorS("checkFirstElement: wrong coefficient"); 319 return false; 320 } 321 for (int i=1; i<=n; i++) 322 { 323 if (p_GetExp(p,i,r)!=0) 324 { 325 WerrorS("checkFirstElement: wrong exponent vector"); 326 return false; 327 } 328 } 329 330 // check second term 331 pIter(p); 332 if (!n_IsOne(p_GetCoeff(p,r->cf),r->cf)) 333 { 334 WerrorS("checkFirstElement: wrong coefficient"); 335 return false; 336 } 337 if (p_GetExp(p,1,r)!=1) 338 { 339 WerrorS("checkFirstElement: wrong exponent vector"); 340 return false; 341 } 342 for (int i=2; i<=n; i++) 343 { 344 if (p_GetExp(p,i,r)!=0) 345 { 346 WerrorS("checkFirstElement: wrong exponent vector"); 347 return false; 348 } 349 } 350 351 return true; 352 } 313 std::pair<ideal,ring> getFlip(const ideal I, const ideal redI, const ring r, const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal) const; 353 314 }; 354 315
Note: See TracChangeset
for help on using the changeset viewer.