1 /*
2  * traverser_bsptree.h
3  *
4  *  Created on: Aug 23, 2011
5  *      Author: anders
6  */
7 
8 #ifndef TRAVERSER_BSPTREE_H_INCLUDED
9 #define TRAVERSER_BSPTREE_H_INCLUDED
10 
11 #include "symmetrictraversal.h"
12 #include "bsptree.h"
13 
14 /**
15  * This class finds the closures of the connected components of the complement of the union of the cones stored in the BSPTree.
16  * TODO: remove this class and replace it by BSPTreeTraverser.
17  */
18   class BSPTreeTraverser: public ConeTraverser
19   {
20     BSPTree const&tree;
21     PolyhedralCone theCone;
22   public:
23           BSPTreeTraverser(int n_, BSPTree const & tree_);
24           virtual void changeCone(IntegerVector const &ridgeVector, IntegerVector const &rayVector);
25           virtual IntegerVectorList link(IntegerVector const &ridgeVector);
26           PolyhedralCone & refToPolyhedralCone();
27           virtual bool hasNoState()const;
28   };
29 
30   /**
31    * This class has the same functionality as BSPTreeTraverser, but with the advantage that the BSP tree need not have been build.
32    * TODO: rename this class and header and source file.
33    */
34   class BSPTreeTraverser2: public ConeTraverser
35   {
36     BSPTree const&tree;
37     PolyhedralCone theCone;
38   public:
39     /**
40      * Set reconstructable to true if the BSPTree stores multiplicities allowing polytope reconstruction.
41      */
42     BSPTreeTraverser2(int n_, BSPTree const & tree_, bool vertexReconstructing_);
43     virtual void changeCone(IntegerVector const &ridgeVector, IntegerVector const &rayVector);
44     virtual IntegerVectorList link(IntegerVector const &ridgeVector);
45     PolyhedralCone & refToPolyhedralCone();
46     virtual bool hasNoState()const;
calibrate()47 	void calibrate(){orthantCalibrate();}
48   };
49 #endif
50