Changeset dffd154 in git for Singular/dyn_modules/gfanlib/startingCone.cc
- Timestamp:
- Sep 20, 2014, 1:53:38 AM (10 years ago)
- Branches:
- (u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
- Children:
- 4664b33f793e7e511d9722557720dd523ec89856
- Parents:
- b71400abefd0c9c66c0009063f40ddd5b1f1c4c7
- git-author:
- Yue Ren <ren@mathematik.uni-kl.de>2014-09-20 01:53:38+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/startingCone.cc
rb71400a rdffd154 336 336 { 337 337 ring r = currentStrategy.getStartingRing(); 338 const ideal I = currentStrategy.getStartingIdeal(); 338 ideal I = currentStrategy.getStartingIdeal(); 339 currentStrategy.reduce(I,r); 339 340 if (currentStrategy.isConstantCoefficientCase()) 340 341 { … … 389 390 // copy the data, so that it be deleted when passed to the loop 390 391 // s <- r 391 // in I<- I392 // inJ <- I 392 393 ring s = rCopy(r); 393 int k = idSize(I); ideal in I= idInit(k);394 int k = idSize(I); ideal inJ = idInit(k); 394 395 nMapFunc identityMap = n_SetMap(r->cf,s->cf); 395 396 for (int i=0; i<k; i++) 396 in I->m[i] = p_PermPoly(I->m[i],NULL,r,s,identityMap,NULL,0);397 inJ->m[i] = p_PermPoly(I->m[i],NULL,r,s,identityMap,NULL,0); 397 398 398 399 // and check whether the dimension of its homogeneity space 399 400 // equals the dimension of the tropical variety 400 gfan::ZCone zc = linealitySpaceOfGroebnerFan(in I,s);401 gfan::ZCone zc = linealitySpaceOfGroebnerFan(inJ,s); 401 402 if (zc.dimension()==currentStrategy.getExpectedDimension()) 402 403 { // this shouldn't happen as trivial cases should be caught beforehand 403 404 // this is the case that the tropical variety consists soely out of the lineality space 404 groebnerCone startingCone(I,in I,s,currentStrategy);405 id_Delete(&in I,s);405 groebnerCone startingCone(I,inJ,s,currentStrategy); 406 id_Delete(&inJ,s); 406 407 rDelete(s); 407 408 return startingCone; … … 410 411 // compute a point in the tropical variety outside the lineality space 411 412 // compute the initial ideal with respect to the weight 412 std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(in I,s,currentStrategy);413 std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(inJ,s,currentStrategy); 413 414 gfan::ZVector startingPoint = startingData.first; 414 415 groebnerCone ambientMaximalCone = groebnerCone(startingData.second); 415 id_Delete(&in I,s); rDelete(s);416 in I= ambientMaximalCone.getPolynomialIdeal();416 id_Delete(&inJ,s); rDelete(s); 417 inJ = ambientMaximalCone.getPolynomialIdeal(); 417 418 s = ambientMaximalCone.getPolynomialRing(); 418 inI = sloppyInitial(inI,s,startingPoint); 419 zc = linealitySpaceOfGroebnerFan(inI,s); 419 inJ = sloppyInitial(inJ,s,startingPoint); 420 ideal inI = initial(I,r,startingPoint); 421 zc = linealitySpaceOfGroebnerFan(inJ,s); 420 422 421 423 // and check whether the dimension of its homogeneity space … … 424 426 { // this case shouldn't happen as trivial cases should be caught beforehand 425 427 // this is the case that the tropical variety has a one-codimensional lineality space 426 ideal J = lift(I,r,in I,s);427 groebnerCone startingCone(J,in I,s,currentStrategy);428 id_Delete(&in I,s);428 ideal J = lift(I,r,inJ,s); 429 groebnerCone startingCone(J,inJ,s,currentStrategy); 430 id_Delete(&inJ,s); 429 431 id_Delete(&J,s); 430 432 return startingCone; 431 433 } 432 434 433 // from this point on, in Icontains the uniformizing parameter,435 // from this point on, inJ contains the uniformizing parameter, 434 436 // hence it contains a monomial if and only if its residue over the residue field does. 435 437 // so we will switch to the residue field … … 439 441 rComplete(rShortcut); 440 442 rTest(rShortcut); 441 k = idSize(in I);442 ideal in IShortcut = idInit(k);443 k = idSize(inJ); 444 ideal inJShortcut = idInit(k); 443 445 nMapFunc takingResidues = n_SetMap(s->cf,rShortcut->cf); 444 446 for (int i=0; i<k; i++) 445 in IShortcut->m[i] = p_PermPoly(inI->m[i],NULL,s,rShortcut,takingResidues,NULL,0);446 idSkipZeroes(in IShortcut);447 id_Delete(&in I,s);448 449 // we are interested in a maximal cone of the tropical variety of in IShortcut447 inJShortcut->m[i] = p_PermPoly(inJ->m[i],NULL,s,rShortcut,takingResidues,NULL,0); 448 idSkipZeroes(inJShortcut); 449 id_Delete(&inJ,s); 450 451 // we are interested in a maximal cone of the tropical variety of inJShortcut 450 452 // this basically equivalent to the case without valuation (or constant coefficient case) 451 453 // except that our ideal is still only homogeneous in the later variables, 452 454 // hence we set the optional parameter completelyHomogeneous as 'false' 453 tropicalStrategy shortcutStrategy(in IShortcut,rShortcut,false);455 tropicalStrategy shortcutStrategy(inJShortcut,rShortcut,false); 454 456 groebnerCone startingConeShortcut = tropicalStartingCone(shortcutStrategy); 455 id_Delete(&in IShortcut,rShortcut); rDelete(rShortcut);456 457 // now we need to obtain the initial of the residue of in I457 id_Delete(&inJShortcut,rShortcut); rDelete(rShortcut); 458 459 // now we need to obtain the initial of the residue of inJ 458 460 // with respect to a weight in the tropical cone, 459 // and obtain the initial of in Iwith respect to the same weight461 // and obtain the initial of inJ with respect to the same weight 460 462 ring sShortcut = startingConeShortcut.getPolynomialRing(); 461 in IShortcut = startingConeShortcut.getPolynomialIdeal();463 inJShortcut = startingConeShortcut.getPolynomialIdeal(); 462 464 gfan::ZCone zd = startingConeShortcut.getPolyhedralCone(); 463 465 gfan::ZVector interiorPoint = startingConeShortcut.getInteriorPoint(); 464 inIShortcut = sloppyInitial(inIShortcut,sShortcut,interiorPoint); 466 inJShortcut = sloppyInitial(inJShortcut,sShortcut,interiorPoint); 467 inI = initial(inI,r,interiorPoint); 465 468 466 469 s = rCopy0(sShortcut); // s will be a ring over the valuation ring … … 470 473 rTest(s); 471 474 472 k = idSize(in IShortcut); // inI will be overwritten with initial of inI473 in I= idInit(k+1);474 in I->m[0] = p_One(s); // with respect to that weight475 k = idSize(inJShortcut); // inJ will be overwritten with initial of inJ 476 inJ = idInit(k+1); 477 inJ->m[0] = p_One(s); // with respect to that weight 475 478 identityMap = n_SetMap(r->cf,s->cf); // first element will obviously be p 476 p_SetCoeff(in I->m[0],identityMap(currentStrategy.getUniformizingParameter(),r->cf,s->cf),s);479 p_SetCoeff(inJ->m[0],identityMap(currentStrategy.getUniformizingParameter(),r->cf,s->cf),s); 477 480 nMapFunc findingRepresentatives = n_SetMap(sShortcut->cf,s->cf); 478 481 for (int i=0; i<k; i++) // and then come the rest 479 in I->m[i+1] = p_PermPoly(inIShortcut->m[i],NULL,sShortcut,s,findingRepresentatives,NULL,0);480 481 ideal J = lift(I,r,inI,s);482 inJ->m[i+1] = p_PermPoly(inJShortcut->m[i],NULL,sShortcut,s,findingRepresentatives,NULL,0); 483 484 ideal J = currentStrategy.computeLift(inJ,s,inI,I,r); 482 485 // currentStrategy.reduce(J,s); 483 groebnerCone startingCone(J,in I,s,currentStrategy);484 id_Delete(&in I,s);486 groebnerCone startingCone(J,inJ,s,currentStrategy); 487 id_Delete(&inJ,s); 485 488 id_Delete(&J,s); 486 489 rDelete(s); 490 id_Delete(&inI,r); 487 491 488 492 assume(checkContainmentInTropicalVariety(startingCone));
Note: See TracChangeset
for help on using the changeset viewer.