Changeset c1ec9a in git for dyn_modules/callgfanlib/gfan.h


Ignore:
Timestamp:
Mar 18, 2013, 6:59:04 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
a601d5555bc411c2f00957c8f324951e8d88085f
Parents:
ae74d2ae268551f6d008e85e9f2ba78cfc3fa92f5417fff5d4d977443ea13f49a1da1d9de9a2a171
Message:
Merge pull request #307 from malex984/gfanlib

Gfanlib
File:
1 moved

Legend:

Unmodified
Added
Removed
  • dyn_modules/callgfanlib/gfan.h

    rae74d2 rc1ec9a  
    22gfan.h Interface to gfan.cc
    33
    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 $
     4Author: monerjan
    75*/
    86#ifdef HAVE_FANS
     
    119#define GFAN_H
    1210
    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>
    2318extern int gfanHeuristic;
    2419
     
    2924  lists grfan(ideal inputIdeal, int heuristic, bool singleCone);
    3025#else
    31   #include <../gfanlib/gfanlib.h>
     26  #include <gfanlib/gfanlib.h>
    3227  gfan::ZFan *grfan(ideal inputIdeal, int h, bool singleCone);
    3328#endif
     
    3934                /** \brief Inner normal of the facet, describing it uniquely up to isomorphism */
    4035                int64vec *fNormal;
    41                
     36
    4237                /** \brief An interior point of the facet*/
    4338                int64vec *interiorPoint;
    44                
     39
    4540                /** \brief Universal Cone Number
    4641                 * The number of the cone the facet belongs to, Set in getConeNormals()
    4742                 */
    4843                int UCN;
    49                
     44
    5045                /** \brief The codim of the facet
    5146                 */
    5247                short codim;
    53                
     48
    5449                /** \brief The Groebner basis on the other side of a shared facet
    5550                 *
    5651                 * 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
    5853                 * just copy the old cone and update the facet and the gcBasis.
    5954                 * facet::flibGB is set via facet::setFlipGB() and printed via facet::printFlipGB
    6055                 */
    6156                ideal flipGB;           //The Groebner Basis on the other side, computed via gcone::flip
    62                
    63         public: 
     57
     58        public:
    6459                /** \brief Boolean value to indicate whether a facet is flippable or not
    6560                * This is also used to mark facets that nominally are flippable but which do
    6661                * not intersect with the positive orthant. This check is done in gcone::getCodim2Normals
    67                  */     
     62                 */
    6863                bool isFlippable;       //**flippable facet? */
    6964                //bool isIncoming;      //Is the facet incoming or outgoing in the reverse search? No longer in use
     
    7570                ring flipRing;          //the ring on the other side of the facet
    7671//              int64vec **fRays;
    77                                
     72
    7873                /** The default constructor. */
    7974                facet();
     
    8883                ~facet();
    8984                /** Comparison operator*/
    90 //              inline bool operator==(const facet *f,const facet *g);                 
     85//              inline bool operator==(const facet *f,const facet *g);
    9186                /** \brief Comparison of facets*/
    9287//              inline bool areEqual(facet *f, facet *g);//Now static
     
    107102                /** Set the UCN */
    108103                inline void setUCN(int n);
    109                 /** \brief Get the UCN 
     104                /** \brief Get the UCN
    110105                 * Returns the UCN iff this != NULL, else -1
    111106                 */
     
    119114                 */
    120115                volatile void fDebugPrint();
    121                 friend class gcone;             
     116                friend class gcone;
    122117};
    123118
    124                
     119
    125120/**
    126121 *\brief Implements the cone structure
     
    132127class gcone
    133128{
    134         private:               
     129        private:
    135130                ideal inputIdeal;       //the original
    136                 ring baseRing;          //the basering of the cone                             
     131                ring baseRing;          //the basering of the cone
    137132                int64vec *ivIntPt;      //an interior point of the cone
    138133                int UCN;                //unique number of the cone
    139134                int pred;               //UCN of the cone this one is derived from
    140135                static int counter;
    141                
    142         public: 
     136
     137        public:
    143138                /** \brief Pointer to the first facet */
    144139                facet *facetPtr;        //Will hold the adress of the first facet; set by gcone::getConeNormals
     
    155150                static float t_dd;
    156151                static float t_kStd;
    157                 static float time_enqueue;             
     152                static float time_enqueue;
    158153                static float time_computeInv;
    159154                static float t_ddMC;
     
    177172                /** The zero vector. Needed in case of fNormal mismatch*/
    178173                static int64vec *ivZeroVector;
    179                
     174
    180175                /** # of facets of the cone
    181176                 * This value is set by gcone::getConeNormals
    182177                 */
    183178                int numFacets;          //#of facets of the cone
    184                
     179
    185180                /**
    186181                 * 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!
    189184                 */
    190185                dd_MatrixPtr ddFacets;  //Matrix to store irredundant facets of the cone
    191                
     186
    192187                /** Array of intvecs representing the rays of the cone*/
    193188                int64vec **gcRays;
     
    197192                gcone *next;            //Pointer to next cone
    198193                gcone *prev;
    199                
     194
    200195                gcone();
    201196                gcone(ring r, ideal I);
     
    212207                inline int getNumFacets();
    213208                inline int getUCN();
    214                 inline int getPredUCN();               
     209                inline int getPredUCN();
    215210                volatile void showFacets(short codim=1);
    216211//              volatile void showSLA(facet &f);
     
    221216//              inline int dotProduct(int64vec &iva, int64vec &ivb);
    222217//              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);
    224219                void noRevS(gcone &gcRoot, bool usingIntPoint=FALSE);
    225220//              inline int intgcd(const int &a, const int &b);
     
    238233                //poly restOfDiv(poly const &f, ideal const &I); removed with r12286
    239234                inline ideal ffG(const ideal &H, const ideal &G);
    240                 inline void getGB(ideal const &inputIdeal);             
     235                inline void getGB(ideal const &inputIdeal);
    241236                void interiorPoint( dd_MatrixPtr &M, int64vec &iv);//used from flip and optionally from getConeNormals
    242237//              void interiorPoint2(); //removed Feb 8th, 2010, new method Feb 19th, 2010, again removed Mar 16th, 2010
     
    244239                ring rCopyAndAddWeight(const ring &r, int64vec *ivw);
    245240                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
    247242//              void reverseSearch(gcone *gcAct); //NOTE both removed from r12286
    248243//              bool isSearchFacet(gcone &gcTmp, facet *testfacet); //NOTE remove
     
    257252                /** Exchange 2 ordertype_a by just 1 */
    258253                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;
    261256};
    262257lists lprepareResult(gcone *gc, const int n);
Note: See TracChangeset for help on using the changeset viewer.