Changeset c6aeb1 in git
- Timestamp:
- Sep 25, 2016, 1:06:15 PM (8 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 45bb8fb89dd5e57b8fe8519b7bd36128192db306
- Parents:
- 12aa9a7684247f22e527acba99afa8e1cf3acb34
- git-author:
- Yue <ren@mathematik.uni-kl.de>2016-09-25 13:06:15+02:00
- git-committer:
- Yue <ren@mathematik.uni-kl.de>2016-09-27 07:29:55+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/gfanlib/startingCone.cc
r12aa9a rc6aeb1 13 13 #include <tropicalVariety.h> 14 14 #include <tropicalStrategy.h> 15 #include <std_wrapper.h> 15 16 16 17 … … 332 333 } 333 334 335 336 ring createTraversalStartingRing(const ring s, const gfan::ZMatrix &startingPoints, const tropicalStrategy& currentStrategy) 337 { 338 // copy r except qideal (which should be 0) and ordering 339 ring s0 = rCopy0(s); 340 int n = rVar(s); 341 deleteOrdering(s0); 342 bool ok; 343 344 // adjust weight and create new ordering 345 int h = startingPoints.getHeight(); 346 s0->order = (int*) omAlloc0((h+3)*sizeof(int)); 347 s0->block0 = (int*) omAlloc0((h+3)*sizeof(int)); 348 s0->block1 = (int*) omAlloc0((h+3)*sizeof(int)); 349 s0->wvhdl = (int**) omAlloc0((h+3)*sizeof(int**)); 350 for (int i=0; i<h; i++) 351 { 352 s0->order[i] = ringorder_a; 353 s0->block0[i] = 1; 354 s0->block1[i] = n; 355 s0->wvhdl[i] = ZVectorToIntStar(startingPoints[i],ok); 356 } 357 s0->order[h] = ringorder_lp; 358 s0->block0[h] = 1; 359 s0->block1[h] = n; 360 s0->order[h+1] = ringorder_C; 361 362 rComplete(s0); 363 rTest(s0); 364 365 return s0; 366 } 367 368 334 369 /*** 335 370 * Computes a starting cone in the tropical variety. … … 361 396 // equals the dimension of the tropical variety 362 397 gfan::ZCone zc = linealitySpaceOfGroebnerFan(inI,s); 363 gfan::ZVector startingPoint; groebnerCone ambientMaximalCone; 398 gfan::ZMatrix startingPoints(0,rVar(r)); 399 groebnerCone ambientMaximalCone; 364 400 if (zc.dimension()>=currentStrategy.getExpectedDimension()) 365 401 { … … 382 418 // compute a point in the tropical variety outside the lineality space 383 419 std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(inI,s,currentStrategy); 384 startingPoint = startingData.first; 420 gfan::ZVector startingPoint = startingData.first; 421 startingPoints.appendRow(startingPoint); 385 422 ambientMaximalCone = groebnerCone(startingData.second); 386 423 … … 399 436 // from this we can read of the inequalities and equations 400 437 438 ring s0 = createTraversalStartingRing(s,startingPoints,currentStrategy); 439 nMapFunc identity = n_SetMap(s->cf,s0->cf); 440 k = IDELEMS(inI); 441 ideal inI0 = idInit(k); 442 for (int i=0; i<k; i++) 443 inI0->m[i] = p_PermPoly(inI->m[i],NULL,s,s0,identity,NULL,0); 444 445 identity = n_SetMap(r->cf,s0->cf); 446 k = IDELEMS(I); 447 ideal I0 = idInit(k); 448 for (int i=0; i<k; i++) 449 I0->m[i] = p_PermPoly(I->m[i],NULL,r,s0,identity,NULL,0); 450 451 401 452 // but before doing so, we must lift the generating set of inI 402 453 // to a generating set of I 403 ideal J = lift(I,r,inI,s); // todo: use computeLift from tropicalStrategy 404 groebnerCone startingCone(J,inI,s,currentStrategy); 405 id_Delete(&inI,s); 406 id_Delete(&J,s); 454 // ideal J0 = lift(I,r,inI0,s0); // todo: use computeLift from tropicalStrategy 455 ideal J0 = gfanlib_kStd_wrapper(I0,s0); 456 assume(areIdealsEqual(J0,s0,I,r)); 457 id_Delete(&I0,s0); 458 groebnerCone startingCone(J0,inI0,s0,currentStrategy); 459 id_Delete(&J0,s0); 460 id_Delete(&inI0,s0); 461 rDelete(s0); 407 462 408 463 // assume(checkContainmentInTropicalVariety(startingCone));
Note: See TracChangeset
for help on using the changeset viewer.