source: git/Singular/dyn_modules/gfanlib/tropicalTraversal.cc @ dffd154

spielwiese
Last change on this file since dffd154 was dffd154, checked in by Yue Ren <ren@…>, 10 years ago
chg: status update 20.09.
  • Property mode set to 100644
File size: 828 bytes
Line 
1#include <groebnerCone.h>
2
3groebnerCones tropicalTraversal(const groebnerCone startingCone)
4{
5  groebnerCones tropicalVariety;
6  groebnerCones workingList;
7  workingList.insert(startingCone);
8  while(!workingList.empty())
9  {
10    std::cout << "starting traversal" << std::endl;
11    const groebnerCone sigma=*(workingList.begin());
12    const groebnerCones neighbours = sigma.tropicalNeighbours();
13    for (groebnerCones::iterator tau = neighbours.begin(); tau!=neighbours.end(); tau++)
14    {
15      if (tropicalVariety.count(*tau)==0)
16        workingList.insert(*tau);
17    }
18    tropicalVariety.insert(sigma);
19    workingList.erase(sigma);
20    std::cout << "tropicalVariety.size():" << tropicalVariety.size() << std::endl;
21    std::cout << "workingList.size():" << workingList.size() << std::endl;
22  }
23  return tropicalVariety;
24}
Note: See TracBrowser for help on using the repository browser.