Changeset 85583b in git for kernel/gfan.h


Ignore:
Timestamp:
Feb 16, 2010, 5:05:03 PM (14 years ago)
Author:
Martin Monerjan
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5e4025d037557e1b2babb26b815b37481f5fb5f4
Parents:
31c447291e9eccdbde66296a43b320588c671e83
Message:
Back to intvec
intvec* facet::getRef2FacetNormal() speeds up gcone::areEqual by about
65%
check for hasHomInput in getExtremalRays & bugfix
bool gcone::iv64isStrictlyPositive


git-svn-id: file:///usr/local/Singular/svn/trunk@12551 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/gfan.h

    r31c447 r85583b  
    1313
    1414#include "intvec.h"
    15 #include "int64vec.h"
     15#include "intvec.h"
    1616
    1717#define p800
     
    3535lists gfan(ideal inputIdeal, int heuristic);
    3636
    37 //int dotProduct(int64vec a, int64vec b);
    38 //bool isParallel(int64vec a, int64vec b);
     37//int dotProduct(intvec a, intvec b);
     38//bool isParallel(intvec a, intvec b);
    3939
    4040class facet
     
    4242        private:
    4343                /** \brief Inner normal of the facet, describing it uniquely up to isomorphism */
    44                 int64vec *fNormal;
     44                intvec *fNormal;
    4545               
    4646                /** \brief An interior point of the facet*/
    47                 int64vec *interiorPoint;
     47                intvec *interiorPoint;
    4848               
    4949                /** \brief Universal Cone Number
     
    9090                /** \brief Comparison of facets*/
    9191                inline bool areEqual(facet *f, facet *g);
    92                 /** Stores the facet normal \param int64vec*/
    93                 inline void setFacetNormal(int64vec *iv);
     92                /** Stores the facet normal \param intvec*/
     93                inline void setFacetNormal(intvec *iv);
    9494                /** Hopefully returns the facet normal */
    95                 inline int64vec *getFacetNormal();
     95                inline intvec *getFacetNormal();
     96                /** Return a reference to the facet normal*/
     97                inline intvec *getRef2FacetNormal();
    9698                /** Method to print the facet normal*/
    9799                inline void printNormal();
     
    109111                inline int getUCN();
    110112                /** Store an interior point of the facet */
    111                 inline void setInteriorPoint(int64vec *iv);
    112                 inline int64vec *getInteriorPoint();
     113                inline void setInteriorPoint(intvec *iv);
     114                inline intvec *getInteriorPoint();
    113115                /** \brief Debugging function
    114116                 * prints the facet normal an all (codim-2)-facets that belong to it
     
    131133                ideal inputIdeal;       //the original
    132134                ring baseRing;          //the basering of the cone                             
    133                 int64vec *ivIntPt;      //an interior point of the cone
     135                intvec *ivIntPt;        //an interior point of the cone
    134136                int UCN;                //unique number of the cone
    135137                int pred;               //UCN of the cone this one is derived from
     
    144146                static float t_getExtremalRays;
    145147                static float time_flip;
     148                static float t_areEqual;
    146149                static float t_ffG;
    147150                static float t_markings;
     
    189192                inline int getCounter();
    190193                inline ring getBaseRing();
    191                 inline void setIntPoint(int64vec *iv);
    192                 inline int64vec *getIntPoint();
     194                inline void setIntPoint(intvec *iv);
     195                inline intvec *getIntPoint();
    193196                inline void showIntPoint();
    194197                inline void setNumFacets();
     
    201204                inline void invPrint(const ideal &I);
    202205                inline bool isMonomial(const ideal &I);
    203                 inline int64vec *ivNeg(int64vec *iv);
    204                 inline int dotProduct(int64vec &iva, int64vec &ivb);
    205                 inline bool isParallel(int64vec &a, int64vec &b);
    206                 inline bool areEqual(int64vec &a, int64vec &b);
    207                 inline bool areEqual(facet *f, facet *g);
     206                inline intvec *ivNeg(intvec *iv);
     207                inline int dotProduct(intvec &iva, intvec &ivb);
     208                inline bool isParallel(intvec &a, intvec &b);
     209                inline bool areEqual(intvec &a, intvec &b);
     210                inline bool areEqual( facet *f, facet *g);
    208211                inline int intgcd(int a, int b);
    209212                inline void writeConeToFile(const gcone &gc, bool usingIntPoints=FALSE);
     
    216219                inline void getExtremalRays(const gcone &gc);
    217220                inline void flip(ideal gb, facet *f);
    218                 inline void computeInv(ideal &gb, ideal &inv, int64vec &f);
     221                inline void computeInv(ideal &gb, ideal &inv, intvec &f);
    219222//              poly restOfDiv(poly const &f, ideal const &I); removed with r12286
    220223                inline ideal ffG(const ideal &H, const ideal &G);
    221224                inline void getGB(ideal const &inputIdeal);             
    222                 inline void interiorPoint( dd_MatrixPtr &M, int64vec &iv);
    223 //              inline void interiorPoint2(const dd_MatrixPtr &M, int64vec &iv);//removed Feb 8th, 2010
     225                inline void interiorPoint( dd_MatrixPtr &M, intvec &iv);
     226//              inline void interiorPoint2(const dd_MatrixPtr &M, intvec &iv);//removed Feb 8th, 2010
    224227                inline void preprocessInequalities(dd_MatrixPtr &M);
    225                 ring rCopyAndAddWeight(const ring &r, int64vec *ivw);
    226                 ring rCopyAndChangeWeight(const ring &r, int64vec *ivw);               
     228                ring rCopyAndAddWeight(const ring &r, intvec *ivw);
     229                ring rCopyAndChangeWeight(const ring &r, intvec *ivw);         
    227230//              void reverseSearch(gcone *gcAct); //NOTE both removed from r12286
    228231//              bool isSearchFacet(gcone &gcTmp, facet *testfacet);
    229232                void noRevS(gcone &gcRoot, bool usingIntPoint=FALSE);
    230                 inline void makeInt(const dd_MatrixPtr &M, const int line, int64vec &n);
     233                inline void makeInt(const dd_MatrixPtr &M, const int line, intvec &n);
    231234                inline void normalize();
    232235                facet * enqueueNewFacets(facet *f);
     
    234237                dd_MatrixPtr facets2Matrix(const gcone &gc);
    235238                /** Compute the lineality space Ax=0 and return it as dd_MatrixPtr dd_LinealitySpace*/
    236                 inline dd_MatrixPtr computeLinealitySpace();           
     239                inline dd_MatrixPtr computeLinealitySpace();
     240                inline bool iv64isStrictlyPositive(intvec *);
    237241//              static void gcone::idPrint(ideal &I);           
    238242                friend class facet;     
    239243};
    240244lists lprepareResult(gcone *gc, int n);
    241 #endif
    242 #endif
     245// bool iv64isStrictlyPositive(intvec *);
     246#endif
     247#endif
Note: See TracChangeset for help on using the changeset viewer.