source: git/dyn_modules/callgfanlib/gitfan.h @ 5417ff

spielwiese
Last change on this file since 5417ff was 81384b, checked in by Yue Ren <ren@…>, 11 years ago
new: newest version of callgfanlib package as master branch also includes minor changes in bigintmat to allow empty matrices and a new function which returns the regular print output as char* (necessary for the print routines of the convex objects)
  • 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#ifdef HAVE_FANS
6
7#include <bbcone.h>
8#include <bbfan.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();
53
54#endif
55#endif
Note: See TracBrowser for help on using the repository browser.