source: git/Singular/dyn_modules/gfanlib/gitfan.h @ b37e6a

spielwiese
Last change on this file since b37e6a was 9996416, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Better builtin handling
  • Property mode set to 100644
File size: 1.1 KB
Line 
1#ifndef GITFAN_H
2#define GITFAN_H
3
4#include <kernel/mod2.h>
5
6#if HAVE_GFANLIB
7
8#include <bbcone.h>
9#include <bbfan.h>
10
11#include <Singular/ipid.h>
12
13
14namespace gitfan
15{
16
17  class facet
18  {
19    gfan::ZCone eta;
20    gfan::ZVector interiorPoint;
21    gfan::ZVector facetNormal;
22
23  public:
24
25    facet();
26    facet(const facet &f);
27    facet(const gfan::ZCone &c, const gfan::ZVector &v, const gfan::ZVector &w);
28    ~facet();
29
30    gfan::ZCone getEta() { return this->eta; };
31    gfan::ZVector getInteriorPoint() { return this->interiorPoint; };
32    gfan::ZVector getFacetNormal() { return this->facetNormal; };
33
34    friend struct facet_compare;
35  };
36
37  struct facet_compare
38  {
39    bool operator()(const facet &f, const facet &g) const
40    {
41      const gfan::ZVector v1 = f.interiorPoint;
42      const gfan::ZVector v2 = g.interiorPoint;
43#ifndef SING_NDEBUG
44      assume(v1.size() == v2.size());
45#endif
46      return v1 < v2;
47    }
48  };
49
50  typedef std::set<facet,facet_compare> facets;
51
52  void mergeFacets(facets &F, const facets &newFacets);
53
54}
55
56void gitfan_setup(SModulFunctions* p);
57#endif
58
59#endif
Note: See TracBrowser for help on using the repository browser.