source: git/Singular/dyn_modules/gfanlib/startingCone.h @ ebb19d

fieker-DuValspielwiese
Last change on this file since ebb19d was ebb19d, checked in by Yue Ren <ren@…>, 10 years ago
new: tropicalCurves prelim version
  • Property mode set to 100644
File size: 922 bytes
Line 
1#ifndef STARTING_CONE_H
2#define STARTING_CONE_H
3
4namespace tropical
5{
6
7  class facet
8  {
9    gfan::ZVector interiorPoint;
10    gfan::ZVector facetNormal;
11
12  public:
13
14    facet();
15    facet(const facet &f);
16    facet(const gfan::ZCone &c, const gfan::ZVector &v, const gfan::ZVector &w);
17    ~facet();
18
19    gfan::ZCone getEta() { return this->eta; };
20    gfan::ZVector getInteriorPoint() { return this->interiorPoint; };
21    gfan::ZVector getFacetNormal() { return this->facetNormal; };
22
23    friend struct facet_compare;
24  };
25
26  struct facet_compare
27  {
28    bool operator()(const facet &f, const facet &g) const
29    {
30      const gfan::ZVector v1 = f.interiorPoint;
31      const gfan::ZVector v2 = g.interiorPoint;
32#ifndef NDEBUG
33      assume(v1.size() == v2.size());
34#endif
35      return v1 < v2;
36    }
37  };
38
39  typedef std::set<facet,facet_compare> facets;
40
41  void mergeFacets(facets &F, const facets &newFacets);
42
43}
44
45#endif
Note: See TracBrowser for help on using the repository browser.