source: git/dyn_modules/callgfanlib/gitfan.h @ 58b407

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