spielwiese
Release-4-3-2p1
Last change
on this file was
15813d,
checked in by Hans Schoenemann <hannes@…>, 7 years ago
|
format
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | #ifndef GFANLIB_TRAVERSAL_H_INCLUDED |
---|
2 | #define GFANLIB_TRAVERSAL_H_INCLUDED |
---|
3 | |
---|
4 | #include "gfanlib_zfan.h" |
---|
5 | |
---|
6 | namespace gfan{ |
---|
7 | /* |
---|
8 | This file contains the generic algorithm for traversing a connected component of a pure fan up to symmetry. |
---|
9 | */ |
---|
10 | class FanTraverser |
---|
11 | { |
---|
12 | public: |
---|
13 | /** |
---|
14 | * Go to the cone which is connected to the current facet through the ridge in direction ray. |
---|
15 | * The "ridge" is a relative interior point of the ridge. |
---|
16 | */ |
---|
17 | virtual void changeCone(ZVector const &ridgeVector, ZVector const &rayVector)=0; |
---|
18 | /** |
---|
19 | * Compute the link of the fan in the ridge given by the vector ridge IS THIS A FACET NORMAL OR AN INTERIOR POINT? |
---|
20 | * This gives a list of symmetry invariant points under the actions keeping the link fixed. |
---|
21 | */ |
---|
22 | virtual std::list<ZVector> link(ZVector const &ridgeVector)=0; |
---|
23 | virtual ZCone & refToPolyhedralCone()=0; |
---|
24 | /** |
---|
25 | * If there is no cone state data for the traverser, half of the changeCone() calls can be avoided. |
---|
26 | * That this is a valid of optimization for the ConeTraverser is indicated returning true in the following function. |
---|
27 | */ |
---|
28 | virtual bool hasNoState()const; |
---|
29 | }; |
---|
30 | |
---|
31 | class Target |
---|
32 | { |
---|
33 | public: |
---|
34 | virtual bool process(FanTraverser &traverser)=0; |
---|
35 | }; |
---|
36 | |
---|
37 | class FanBuilder : public Target |
---|
38 | { |
---|
39 | ZFan coneCollection; |
---|
40 | public: |
---|
41 | ZFan const &getFanRef(){return coneCollection;} |
---|
42 | FanBuilder(int n, SymmetryGroup const &sym); |
---|
43 | bool process(FanTraverser &Traverser); |
---|
44 | }; |
---|
45 | |
---|
46 | void traverse(FanTraverser &traverser, Target &target, SymmetryGroup const *sym=0); |
---|
47 | }; |
---|
48 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.