Changeset c1ec9a in git for dyn_modules/callgfanlib/gfan.h
- Timestamp:
- Mar 18, 2013, 6:59:04 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
- Children:
- a601d5555bc411c2f00957c8f324951e8d88085f
- Parents:
- ae74d2ae268551f6d008e85e9f2ba78cfc3fa92f5417fff5d4d977443ea13f49a1da1d9de9a2a171
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
dyn_modules/callgfanlib/gfan.h
rae74d2 rc1ec9a 2 2 gfan.h Interface to gfan.cc 3 3 4 $Author: monerjan $ 5 $Date: 2009/11/03 06:57:32 $ 6 $Header: /usr/local/Singular/cvsroot/kernel/gfan.h,v 1.13 2009/11/03 06:57:32 monerjan Exp $ 4 Author: monerjan 7 5 */ 8 6 #ifdef HAVE_FANS … … 11 9 #define GFAN_H 12 10 13 #include <misc/int64vec.h> 14 15 #define p800 16 #ifdef p800 17 #include <kernel/../../cddlib/include/setoper.h> 18 #include <kernel/../../cddlib/include/cdd.h> 19 #include <kernel/../../cddlib/include/cddmp.h> 20 #endif 21 #include <kernel/bbfan.h> 22 #include <kernel/bbcone.h> 11 #include <libpolys/misc/int64vec.h> 12 13 #include <setoper.h> 14 #include <cdd.h> 15 #include <cddmp.h> 16 #include <bbfan.h> 17 #include <bbcone.h> 23 18 extern int gfanHeuristic; 24 19 … … 29 24 lists grfan(ideal inputIdeal, int heuristic, bool singleCone); 30 25 #else 31 #include < ../gfanlib/gfanlib.h>26 #include <gfanlib/gfanlib.h> 32 27 gfan::ZFan *grfan(ideal inputIdeal, int h, bool singleCone); 33 28 #endif … … 39 34 /** \brief Inner normal of the facet, describing it uniquely up to isomorphism */ 40 35 int64vec *fNormal; 41 36 42 37 /** \brief An interior point of the facet*/ 43 38 int64vec *interiorPoint; 44 39 45 40 /** \brief Universal Cone Number 46 41 * The number of the cone the facet belongs to, Set in getConeNormals() 47 42 */ 48 43 int UCN; 49 44 50 45 /** \brief The codim of the facet 51 46 */ 52 47 short codim; 53 48 54 49 /** \brief The Groebner basis on the other side of a shared facet 55 50 * 56 51 * In order not to have to compute the flipped GB twice we store the basis we already get 57 * when identifying search facets. Thus in the next step of the reverse search we can 52 * when identifying search facets. Thus in the next step of the reverse search we can 58 53 * just copy the old cone and update the facet and the gcBasis. 59 54 * facet::flibGB is set via facet::setFlipGB() and printed via facet::printFlipGB 60 55 */ 61 56 ideal flipGB; //The Groebner Basis on the other side, computed via gcone::flip 62 63 public: 57 58 public: 64 59 /** \brief Boolean value to indicate whether a facet is flippable or not 65 60 * This is also used to mark facets that nominally are flippable but which do 66 61 * not intersect with the positive orthant. This check is done in gcone::getCodim2Normals 67 */ 62 */ 68 63 bool isFlippable; //**flippable facet? */ 69 64 //bool isIncoming; //Is the facet incoming or outgoing in the reverse search? No longer in use … … 75 70 ring flipRing; //the ring on the other side of the facet 76 71 // int64vec **fRays; 77 72 78 73 /** The default constructor. */ 79 74 facet(); … … 88 83 ~facet(); 89 84 /** Comparison operator*/ 90 // inline bool operator==(const facet *f,const facet *g); 85 // inline bool operator==(const facet *f,const facet *g); 91 86 /** \brief Comparison of facets*/ 92 87 // inline bool areEqual(facet *f, facet *g);//Now static … … 107 102 /** Set the UCN */ 108 103 inline void setUCN(int n); 109 /** \brief Get the UCN 104 /** \brief Get the UCN 110 105 * Returns the UCN iff this != NULL, else -1 111 106 */ … … 119 114 */ 120 115 volatile void fDebugPrint(); 121 friend class gcone; 116 friend class gcone; 122 117 }; 123 118 124 119 125 120 /** 126 121 *\brief Implements the cone structure … … 132 127 class gcone 133 128 { 134 private: 129 private: 135 130 ideal inputIdeal; //the original 136 ring baseRing; //the basering of the cone 131 ring baseRing; //the basering of the cone 137 132 int64vec *ivIntPt; //an interior point of the cone 138 133 int UCN; //unique number of the cone 139 134 int pred; //UCN of the cone this one is derived from 140 135 static int counter; 141 142 public: 136 137 public: 143 138 /** \brief Pointer to the first facet */ 144 139 facet *facetPtr; //Will hold the adress of the first facet; set by gcone::getConeNormals … … 155 150 static float t_dd; 156 151 static float t_kStd; 157 static float time_enqueue; 152 static float time_enqueue; 158 153 static float time_computeInv; 159 154 static float t_ddMC; … … 177 172 /** The zero vector. Needed in case of fNormal mismatch*/ 178 173 static int64vec *ivZeroVector; 179 174 180 175 /** # of facets of the cone 181 176 * This value is set by gcone::getConeNormals 182 177 */ 183 178 int numFacets; //#of facets of the cone 184 179 185 180 /** 186 181 * At least as a workaround we store the irredundant facets of a matrix here. 187 * This is needed to compute an interior points of a cone. Note that there 188 * will be non-flippable facets in it! 182 * This is needed to compute an interior points of a cone. Note that there 183 * will be non-flippable facets in it! 189 184 */ 190 185 dd_MatrixPtr ddFacets; //Matrix to store irredundant facets of the cone 191 186 192 187 /** Array of intvecs representing the rays of the cone*/ 193 188 int64vec **gcRays; … … 197 192 gcone *next; //Pointer to next cone 198 193 gcone *prev; 199 194 200 195 gcone(); 201 196 gcone(ring r, ideal I); … … 212 207 inline int getNumFacets(); 213 208 inline int getUCN(); 214 inline int getPredUCN(); 209 inline int getPredUCN(); 215 210 volatile void showFacets(short codim=1); 216 211 // volatile void showSLA(facet &f); … … 221 216 // inline int dotProduct(int64vec &iva, int64vec &ivb); 222 217 // inline int dotProduct(const int64vec &iva, const int64vec &ivb); 223 // inline bool isParallel(const int64vec &a, const int64vec &b); 218 // inline bool isParallel(const int64vec &a, const int64vec &b); 224 219 void noRevS(gcone &gcRoot, bool usingIntPoint=FALSE); 225 220 // inline int intgcd(const int &a, const int &b); … … 238 233 //poly restOfDiv(poly const &f, ideal const &I); removed with r12286 239 234 inline ideal ffG(const ideal &H, const ideal &G); 240 inline void getGB(ideal const &inputIdeal); 235 inline void getGB(ideal const &inputIdeal); 241 236 void interiorPoint( dd_MatrixPtr &M, int64vec &iv);//used from flip and optionally from getConeNormals 242 237 // void interiorPoint2(); //removed Feb 8th, 2010, new method Feb 19th, 2010, again removed Mar 16th, 2010 … … 244 239 ring rCopyAndAddWeight(const ring &r, int64vec *ivw); 245 240 ring rCopyAndAddWeight2(const ring &, const int64vec *, const int64vec *); 246 // ring rCopyAndChangeWeight(const ring &r, int64vec *ivw); //NOTE remove 241 // ring rCopyAndChangeWeight(const ring &r, int64vec *ivw); //NOTE remove 247 242 // void reverseSearch(gcone *gcAct); //NOTE both removed from r12286 248 243 // bool isSearchFacet(gcone &gcTmp, facet *testfacet); //NOTE remove … … 257 252 /** Exchange 2 ordertype_a by just 1 */ 258 253 void replaceDouble_ringorder_a_ByASingleOne(); 259 // static void gcone::idPrint(ideal &I); 260 // friend class facet; 254 // static void gcone::idPrint(ideal &I); 255 // friend class facet; 261 256 }; 262 257 lists lprepareResult(gcone *gc, const int n);
Note: See TracChangeset
for help on using the changeset viewer.