Changeset a355e47 in git


Ignore:
Timestamp:
Feb 5, 2010, 8:06:33 AM (13 years ago)
Author:
Martin Monerjan
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
55587862408d1e92ee43d342befb2d834ea91635
Parents:
4b3ef4b5fc9fc4028f935c1c66834052d01ef1d2
Message:
Switched to int64vec


git-svn-id: file:///usr/local/Singular/svn/trunk@12517 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    r4b3ef4b ra355e47  
    1313#include "kstd1.h"
    1414#include "kutil.h"      //ksCreateSpoly
    15 // #include "intvec.h"
     15// #include "int64vec.h"
    1616#include "polys.h"
    1717#include "ideals.h"
     
    133133facet::facet(const facet& f)
    134134{
    135         this->fNormal=ivCopy(f.fNormal);
     135        this->fNormal=iv64Copy(f.fNormal);
    136136        this->UCN=f.UCN;
    137137        this->isFlippable=f.isFlippable;
     
    155155                        f2Act->prev = marker;
    156156                }
    157                 intvec *f2Normal;
     157                int64vec *f2Normal;
    158158                f2Normal = f2Copy->getFacetNormal();
    159159//              f2Act->setFacetNormal(f2Copy->getFacetNormal());
     
    208208        int notParallelCtr=0;
    209209        int ctr=0;
    210         intvec* fNormal; //No new since ivCopy and therefore getFacetNormal return a new
    211         intvec* sNormal;
     210        int64vec* fNormal; //No new since iv64Copy and therefore getFacetNormal return a new
     211        int64vec* sNormal;
    212212        fNormal = f->getFacetNormal();
    213213        sNormal = s->getFacetNormal();
    214214        //Do not need parallelity. Too time consuming
    215         if(!isParallel(fNormal,sNormal))
     215        if(!isParallel(*fNormal,*sNormal))
    216216                notParallelCtr++;
    217 //      intvec *foo=ivNeg(sNormal);
     217//      int64vec *foo=ivNeg(sNormal);
    218218//      if(fNormal->compare(foo)!=0) //facet normals
    219219//              return TRUE;   
     
    226226                while(f2Act!=NULL)
    227227                {
    228                         intvec* f2Normal;
     228                        int64vec* f2Normal;
    229229                        f2Normal = f2Act->getFacetNormal();
    230230                        s2Act = s->codim2Ptr;
    231231                        while(s2Act!=NULL)
    232232                        {
    233                                 intvec* s2Normal;
     233                                int64vec* s2Normal;
    234234                                s2Normal = s2Act->getFacetNormal();
    235235//                              bool foo=areEqual(f2Normal,s2Normal);
     
    258258}       
    259259               
    260 /** Stores the facet normal \param intvec*/
    261 inline void facet::setFacetNormal(intvec *iv)
    262 {
    263         this->fNormal = ivCopy(iv);                     
     260/** Stores the facet normal \param int64vec*/
     261inline void facet::setFacetNormal(int64vec *iv)
     262{
     263        this->fNormal = iv64Copy(iv);                   
    264264}
    265265               
    266266/** Hopefully returns the facet normal
    267 * Mind: ivCopy returns a new intvec, so use this in the following way:
    268 * intvec *iv;
     267* Mind: iv64Copy returns a new int64vec, so use this in the following way:
     268* int64vec *iv;
    269269* iv = this->getFacetNormal();
    270270* [...]
    271271* delete(iv);
    272272*/
    273 inline intvec *facet::getFacetNormal()
     273inline int64vec *facet::getFacetNormal()
    274274{                               
    275         return ivCopy(this->fNormal);
     275        return iv64Copy(this->fNormal);
    276276//      return this->fNormal;
    277277}
     
    318318{
    319319        if(this!=NULL)//  && this!=(facet *)0xfbfbfbfbfbfbfbfb)// || this!=(facet *)0xfbfbfbfb) )
    320 //      if(this!=NULL && ( this->fNormal!=(intvec *)0xfbfbfbfb || this->fNormal!=(intvec *)0xfbfbfbfbfbfbfbfb) )
     320//      if(this!=NULL && ( this->fNormal!=(int64vec *)0xfbfbfbfb || this->fNormal!=(int64vec *)0xfbfbfbfbfbfbfbfb) )
    321321                return this->UCN;
    322322        else
     
    325325               
    326326/** Store an interior point of the facet */
    327 inline void facet::setInteriorPoint(intvec *iv)
    328 {
    329         this->interiorPoint = ivCopy(iv);
     327inline void facet::setInteriorPoint(int64vec *iv)
     328{
     329        this->interiorPoint = iv64Copy(iv);
    330330}
    331331               
    332332/** Returns a pointer to this->interiorPoint
    333 * MIND: ivCopy returns a new intvec
     333* MIND: iv64Copy returns a new int64vec
    334334* @see facet::getFacetNormal
    335335*/
    336 inline intvec *facet::getInteriorPoint()
    337 {
    338         return ivCopy(this->interiorPoint);
     336inline int64vec *facet::getInteriorPoint()
     337{
     338        return iv64Copy(this->interiorPoint);
    339339}       
    340340               
     
    346346        facet *codim2Act;                       
    347347        codim2Act = this->codim2Ptr;
    348         intvec *fNormal;
     348        int64vec *fNormal;
    349349        fNormal = this->getFacetNormal();       
    350350        cout << "=======================" << endl;
     
    356356        while(codim2Act!=NULL)
    357357        {
    358                 intvec *f2Normal;
     358                int64vec *f2Normal;
    359359                f2Normal = codim2Act->getFacetNormal();
    360360                cout << "(";
     
    487487       
    488488/** \brief Set the interior point of a cone */
    489 inline void gcone::setIntPoint(intvec *iv)
    490 {
    491         this->ivIntPt=ivCopy(iv);
     489inline void gcone::setIntPoint(int64vec *iv)
     490{
     491        this->ivIntPt=iv64Copy(iv);
    492492}
    493493               
    494494/** \brief Return the interior point */
    495 inline intvec *gcone::getIntPoint()
    496 {
    497         return ivCopy(this->ivIntPt);
     495inline int64vec *gcone::getIntPoint()
     496{
     497        return iv64Copy(this->ivIntPt);
    498498}
    499499               
     
    524524        while(f!=NULL)
    525525        {
    526                 intvec *iv;
     526                int64vec *iv;
    527527                iv = f->getFacetNormal();
    528528                cout << "(";
     
    561561        while(fAct!=NULL)
    562562        {
    563                 intvec *fNormal;               
     563                int64vec *fNormal;             
    564564                fNormal=fAct->getFacetNormal();
    565565                cout << "(";
     
    574574                while(codim2Act!=NULL)
    575575                {
    576                         intvec *f2Normal;
     576                        int64vec *f2Normal;
    577577                        f2Normal = codim2Act->getFacetNormal();
    578578                        cout << "(";
     
    721721        */
    722722//      ideal initialForm=idInit(IDELEMS(I),1);
    723 //      intvec *gamma=new intvec(this->numVars);
     723//      int64vec *gamma=new int64vec(this->numVars);
    724724        int falseGammaCounter=0;
    725725        int *redRowsArray=NULL;
     
    731731                //read row ii into gamma
    732732                double tmp;
    733                 intvec *gamma=new intvec(this->numVars);
     733                int64vec *gamma=new int64vec(this->numVars);
    734734                for(int jj=1;jj<=this->numVars;jj++)
    735735                {
     
    833833        for(int ii=0;ii<ddineq->rowsize;ii++)
    834834        {
    835                 intvec *ivPos = new intvec(this->numVars);
     835                int64vec *ivPos = new int64vec(this->numVars);
    836836                for(int jj=0;jj<this->numVars;jj++)
    837837                        (*ivPos)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]);
     
    840840                for(int jj=0;jj<this->numVars;jj++)
    841841                {
    842                         intvec *ivCanonical = new intvec(this->numVars);
     842                        int64vec *ivCanonical = new int64vec(this->numVars);
    843843                        jj==0 ? (*ivCanonical)[ivPos->length()-1]=1 : (*ivCanonical)[jj-1]=1;
    844844                        if(dotProduct(*ivCanonical,*ivPos)!=0)
     
    891891        for (int kk = 0; kk<ddrows; kk++)
    892892        {
    893                 intvec *load = new intvec(this->numVars);//intvec to store a single facet normal that will then be stored via setFacetNormal
     893                int64vec *load = new int64vec(this->numVars);//int64vec to store a single facet normal that will then be stored via setFacetNormal
    894894                for (int jj = 1; jj <ddcols; jj++)
    895895                {
     
    908908                        for(int jj = 0; jj<load->length(); jj++)
    909909                        {
    910                                 intvec *ivCanonical = new intvec(load->length());
     910                                int64vec *ivCanonical = new int64vec(load->length());
    911911                                (*ivCanonical)[jj]=1;
    912912                                if (dotProduct(*load,*ivCanonical)<0)   
     
    996996        if (compIntPoint==TRUE)
    997997        {
    998                 intvec *iv = new intvec(this->numVars);
     998                int64vec *iv = new int64vec(this->numVars);
    999999                dd_MatrixPtr posRestr=dd_CreateMatrix(this->numVars,this->numVars+1);
    10001000                int jj=1;
     
    10841084                                codim2Act = codim2Act->next;
    10851085                        }
    1086                         intvec *n = new intvec(this->numVars);
     1086                        int64vec *n = new int64vec(this->numVars);
    10871087#ifdef gfanp
    10881088                        timeval t_mI_start, t_mI_end;
     
    11091109                */
    11101110                //TODO It might be faster to compute jus the implied equations instead of a relative interior point
    1111 //              intvec *iv_intPoint = new intvec(this->numVars);
     1111//              int64vec *iv_intPoint = new int64vec(this->numVars);
    11121112//              dd_MatrixPtr shiftMatrix;
    11131113//              dd_MatrixPtr intPointMatrix;
     
    12071207        while(fAct!=NULL)
    12081208        {
    1209                 intvec *fNormal;// = new intvec(this->numVars);
     1209                int64vec *fNormal;// = new int64vec(this->numVars);
    12101210                fNormal = fAct->getFacetNormal();
    12111211                for(int ii=0;ii<rows;ii++)
    12121212                {
    1213                         intvec *rowvec = new intvec(this->numVars);
     1213                        int64vec *rowvec = new int64vec(this->numVars);
    12141214                        makeInt(P,ii+1,*rowvec);//get an integer entry instead of rational
    12151215                        if(dotProduct(*fNormal,*rowvec)==0)
     
    12851285                {
    12861286                        containsStrictlyPosRay==TRUE;
    1287                         intvec *rayvec;
     1287                        int64vec *rayvec;
    12881288                        rayvec = codim2Act->getFacetNormal();//Mind this is no normal but a ray!
    12891289                        int negCtr=0;
     
    13351335        gettimeofday(&start, 0);
    13361336#endif         
    1337         intvec *fNormal;// = new intvec(this->numVars); //facet normal, check for parallelity                   
     1337        int64vec *fNormal;// = new int64vec(this->numVars);     //facet normal, check for parallelity                   
    13381338        fNormal = f->getFacetNormal();  //read this->fNormal;
    13391339
     
    13731373        if( (srcRing->order[0]!=ringorder_a))
    13741374        {
    1375                 intvec *iv = new intvec(this->numVars);
     1375                int64vec *iv = new int64vec(this->numVars);
    13761376                iv = ivNeg(fNormal);
    13771377//              tmpRing=rCopyAndAddWeight(srcRing,ivNeg(fNormal));
     
    15801580        dd_FreeMatrix(posRestr);
    15811581
    1582         intvec *iv_weight = new intvec(this->numVars);
     1582        int64vec *iv_weight = new int64vec(this->numVars);
    15831583#ifdef gfanp
    15841584        timeval t_dd_start, t_dd_end;
     
    16031603        for(int ii=0;ii<P->rowsize;ii++)
    16041604        {
    1605                 intvec *iv_row=new intvec(this->numVars);
     1605                int64vec *iv_row=new int64vec(this->numVars);
    16061606                makeInt(P,ii+1,*iv_row);
    16071607                iv_weight =ivAdd(iv_weight, iv_row);
     
    16821682 * and in gcone::flip for obvious reasons.
    16831683*/
    1684 inline void gcone::computeInv(ideal &gb, ideal &initialForm, intvec &fNormal)
     1684inline void gcone::computeInv(ideal &gb, ideal &initialForm, int64vec &fNormal)
    16851685{
    16861686#ifdef gfanp
     
    16971697                while(pNext(aktpoly)!=NULL)     /*loop trough terms and check for parallelity*/
    16981698                {
    1699                         intvec *check = new intvec(this->numVars);
     1699                        int64vec *check = new int64vec(this->numVars);
    17001700                        aktpoly=pNext(aktpoly); //next term
    17011701//                      pSetm(aktpoly);
    17021702                        int *v=(int *)omAlloc((this->numVars+1)*sizeof(int));
    17031703                        pGetExpV(aktpoly,v);           
    1704                         /* Convert (int)v into (intvec)check */                 
     1704                        /* Convert (int)v into (int64vec)check */                       
    17051705                        for (int jj=0;jj<this->numVars;jj++)
    17061706                        {
     
    17861786        for(int ii=0;ii<ddineq->rowsize;ii++)
    17871787        {
    1788                 intvec *iv = new intvec(this->numVars);
     1788                int64vec *iv = new int64vec(this->numVars);
     1789                int64vec *ivNull = new int64vec(this->numVars);//Needed for intvec64::compare(*intvec)
    17891790                int posCtr=0;
    17901791                for(int jj=0;jj<this->numVars;jj++)
     
    17961797                }
    17971798//              if( (iv->compare(0)==0) || (posCtr==iv->length()) )
    1798                 if( (posCtr==iv->length()) || (iv->compare(0)==0) )             
     1799                if( (posCtr==iv->length()) || (iv->compare(ivNull)==0) )               
    17991800                {
    18001801                        dd_MatrixRowRemove(&ddineq,ii+1);
     
    18121813//      for(int ii=0;ii<num_newRows-1;ii++)
    18131814//      {
    1814 //              intvec *iv = new intvec(this->numVars);//1st vector to check against
     1815//              int64vec *iv = new int64vec(this->numVars);//1st vector to check against
    18151816//              for(int jj=0;jj<this->numVars;jj++)
    18161817//                      (*iv)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]);
    18171818//              for(int jj=ii+1;jj</*ddineq->rowsize*/num_newRows;jj++)
    18181819//              {
    1819 //                      intvec *ivCheck = new intvec(this->numVars);//Checked against iv
     1820//                      int64vec *ivCheck = new int64vec(this->numVars);//Checked against iv
    18201821//                      for(int kk=0;kk<this->numVars;kk++)
    18211822//                              (*ivCheck)[kk]=(int)mpq_get_d(ddineq->matrix[jj][kk+1]);
     
    18681869}//void getGB
    18691870               
    1870 /** \brief Compute the negative of a given intvec
     1871/** \brief Compute the negative of a given int64vec
    18711872        */             
    1872 inline intvec *gcone::ivNeg(const intvec *iv)
    1873 {
     1873inline int64vec *gcone::ivNeg(int64vec *iv)
     1874{       //Hm, switching to int64vec const int64vec does no longer work
    18741875        //NOTE: Can't this be done without new?
    1875         intvec *res;// = new intvec(iv->length());
    1876         res=ivCopy(iv);
     1876        int64vec *res;// = new int64vec(iv->length());
     1877        res=iv64Copy(iv);
    18771878        *res *= (int)-1;                                               
    18781879        return res;
     
    18831884*
    18841885*/
    1885 inline int gcone::dotProduct(const intvec &iva, const intvec &ivb)                             
     1886inline int gcone::dotProduct(int64vec &iva, int64vec &ivb)                             
    18861887{                       
    18871888        int res=0;
     
    18971898 * \f$ \alpha\parallel\beta\Leftrightarrow\langle\alpha,\beta\rangle^2=\langle\alpha,\alpha\rangle\langle\beta,\beta\rangle \f$
    18981899 */
    1899 inline bool gcone::isParallel(const intvec &a, const intvec &b)
     1900inline bool gcone::isParallel(int64vec &a, int64vec &b)
    19001901{                       
    19011902        int lhs,rhs;
     
    19161917               
    19171918/** \brief Compute an interior point of a given cone
    1918  * Result will be written into intvec iv.
     1919 * Result will be written into int64vec iv.
    19191920 * Any rational point is automatically converted into an integer.
    19201921 */
    1921 inline void gcone::interiorPoint( dd_MatrixPtr &M, intvec &iv) //no const &M here since we want to remove redundant rows
     1922inline void gcone::interiorPoint( dd_MatrixPtr &M, int64vec &iv) //no const &M here since we want to remove redundant rows
    19221923{
    19231924        dd_LPPtr lp,lpInt;
     
    20182019}//void interiorPoint(dd_MatrixPtr const &M)
    20192020
    2020 inline void gcone::interiorPoint2(const dd_MatrixPtr &M, intvec &iv)
     2021inline void gcone::interiorPoint2(const dd_MatrixPtr &M, int64vec &iv)
    20212022{
    20222023        KMatrix<Rational> mMat(M->rowsize+1,M->colsize);
     
    20702071 *
    20712072 */
    2072 ring gcone::rCopyAndAddWeight(const ring &r, const intvec *ivw)                         
     2073ring gcone::rCopyAndAddWeight(const ring &r, int64vec *ivw)                             
    20732074{
    20742075        ring res=rCopy0(r);
     
    21052106}//rCopyAndAdd
    21062107               
    2107 ring rCopyAndChangeWeight(ring const &r, intvec *ivw)
     2108ring rCopyAndChangeWeight(ring const &r, int64vec *ivw)
    21082109{
    21092110        ring res=rCopy0(currRing);
     
    21262127/** \brief Check for equality of two intvecs
    21272128 */
    2128 inline bool gcone::areEqual(const intvec &a, const intvec &b)
     2129inline bool gcone::areEqual(int64vec &a, int64vec &b)
    21292130{
    21302131        bool res=TRUE;
     
    22622263 * Compute gcBasis and facets for the arbitrary starting cone. Store \f$(codim-1)\f$-facets as normals.
    22632264 * In order to represent a facet uniquely compute also the \f$(codim-2)\f$-facets and norm by the gcd of the components.
    2264  * Keep a list of facets as a linked list containing an intvec and an integer matrix.
     2265 * Keep a list of facets as a linked list containing an int64vec and an integer matrix.
    22652266 * Since a \f$(codim-1)\f$-facet belongs to exactly two full dimensional cones, we remove a facet from the list as
    22662267 * soon as we compute this facet again. Comparison of facets is done by...
     
    23292330                if(fAct->isFlippable==TRUE)
    23302331                {
    2331                         intvec *fNormal;
     2332                        int64vec *fNormal;
    23322333                        fNormal = fAct->getFacetNormal();
    23332334                        if( ii==0 || (ii>0 && SearchListAct==NULL) ) //1st facet may be non-flippable
     
    23532354//                      for(int jj=0;jj<fAct->numRays-1;jj++)
    23542355                        {
    2355                                 intvec *f2Normal;
     2356                                int64vec *f2Normal;
    23562357                                f2Normal = codim2Act->getFacetNormal();
    23572358                                if(jj==0)
     
    25112512 *
    25122513 * We compute the lcm of the denominators and multiply with this to get integer values.         
    2513  * \param dd_MatrixPtr,intvec
     2514 * \param dd_MatrixPtr,int64vec
    25142515 */
    2515 inline void gcone::makeInt(const dd_MatrixPtr &M, const int line, intvec &n)
     2516inline void gcone::makeInt(const dd_MatrixPtr &M, const int line, int64vec &n)
    25162517{                       
    25172518//      mpz_t denom[this->numVars];
     
    25822583        while(fAct!=NULL)
    25832584        {
    2584                 intvec *fNormal;
     2585                int64vec *fNormal;
    25852586                fNormal = fAct->getFacetNormal();
    25862587                for(int ii=0;ii<this->numVars;ii++)
     
    25952596                while(codim2Act!=NULL)
    25962597                {                               
    2597                         intvec *n;
     2598                        int64vec *n;
    25982599                        n=codim2Act->getFacetNormal();
    25992600                        for(int ii=0;ii<this->numVars;ii++)
     
    26732674        }
    26742675        /*1st step: compare facetNormals*/
    2675 //      intvec *fNormal=NULL;gcone::
    2676 //      intvec *slNormal=NULL;
     2676//      int64vec *fNormal=NULL;gcone::
     2677//      int64vec *slNormal=NULL;
    26772678                       
    26782679        while(fAct!=NULL)
     
    26802681                if(fAct->isFlippable==TRUE)
    26812682                {
    2682                         intvec *fNormal=NULL;
    2683 //                      intvec *slNormal=NULL;
     2683                        int64vec *fNormal=NULL;
     2684//                      int64vec *slNormal=NULL;
    26842685                        fNormal=fAct->getFacetNormal();
    26852686                        slAct = slHead;
     
    27112712                        //while(slAct!=slEndStatic->next)
    27122713                        {
    2713                                 intvec *slNormal=NULL;
     2714                                int64vec *slNormal=NULL;
    27142715                                removalOccured=FALSE;
    27152716                                slNormal = slAct->getFacetNormal();
     
    27972798                                slEnd->prev = marker;
    27982799                                //Copy codim2-facets
    2799 //                              intvec *f2Normal=new intvec(this->numVars);
     2800//                              int64vec *f2Normal=new int64vec(this->numVars);
    28002801                                while(f2Act!=NULL)
    28012802                                {
    2802                                         intvec *f2Normal;
     2803                                        int64vec *f2Normal;
    28032804                                        f2Normal=f2Act->getFacetNormal();
    28042805                                        if(slEndCodim2Root==NULL)
     
    28942895        while(fAct!=NULL)
    28952896        {
    2896                 intvec *comp;
     2897                int64vec *comp;
    28972898                comp = fAct->getFacetNormal();
    28982899                for(int ii=0;ii<this->numVars;ii++)
     
    29692970                while(fAct!=NULL)
    29702971                {       
    2971                         intvec *iv;
     2972                        int64vec *iv;
    29722973                        iv=fAct->getFacetNormal();
    29732974                        f2Act=fAct->codim2Ptr;
     
    29862987                        while(f2Act!=NULL)
    29872988                        {
    2988                                 intvec *iv2;
     2989                                int64vec *iv2;
    29892990                                iv2=f2Act->getFacetNormal();   
    29902991                                for(int jj=0;jj<iv2->length();jj++)
     
    30573058//                      string strweight;
    30583059//                      strweight=line.substr(0,line.find_first_of(")"));
    3059 //                      intvec *iv=new intvec(this->numVars);
     3060//                      int64vec *iv=new int64vec(this->numVars);
    30603061//                      for(int ii=0;ii<this->numVars;ii++)
    30613062//                      {
     
    32593260
    32603261                l->m[2].rtyp=INTVEC_CMD;
    3261                 intvec iv=(gcAct->f2M(gcAct,gcAct->facetPtr));
    3262                 l->m[2].data=(void*)ivCopy(&iv);
     3262                int64vec iv=(gcAct->f2M(gcAct,gcAct->facetPtr));
     3263                l->m[2].data=(void*)iv64Copy(&iv);
    32633264               
    32643265                l->m[3].rtyp=LIST_CMD;
     
    32703271                        {
    32713272                                lCodim2List->m[jj].rtyp=INTVEC_CMD;
    3272                                 intvec ivC2=(gcAct->f2M(gcAct,fAct,2));
    3273                                 lCodim2List->m[jj].data=(void*)ivCopy(&ivC2);
     3273                                int64vec ivC2=(gcAct->f2M(gcAct,fAct,2));
     3274                                lCodim2List->m[jj].data=(void*)iv64Copy(&ivC2);
    32743275                                jj++;
    32753276                                fAct = fAct->next;
     
    32913292*
    32923293*/
    3293 inline intvec gcone::f2M(gcone *gc, facet *f, int n)
     3294inline int64vec gcone::f2M(gcone *gc, facet *f, int n)
    32943295{
    32953296        facet *fAct;
    3296         intvec *res;//=new intvec(this->numVars);       
     3297        int64vec *res;//=new int64vec(this->numVars);   
    32973298//      int codim=n;
    32983299//      int bound;
     
    33003301        if(n==1)
    33013302        {
    3302                 intvec *m1Res=new intvec(gc->numFacets,gc->numVars,0);
    3303                 res = ivCopy(m1Res);
     3303                int64vec *m1Res=new int64vec(gc->numFacets,gc->numVars,0);
     3304                res = iv64Copy(m1Res);
    33043305                fAct = gc->facetPtr;
    33053306                delete m1Res;
     
    33093310        {
    33103311                fAct = f->codim2Ptr;
    3311                 intvec *m2Res = new intvec(f->numCodim2Facets,gc->numVars,0);
    3312                 res = ivCopy(m2Res);
     3312                int64vec *m2Res = new int64vec(f->numCodim2Facets,gc->numVars,0);
     3313                res = iv64Copy(m2Res);
    33133314                delete m2Res;   
    33143315//              bound = fAct->numCodim2Facets*(this->numVars);
     
    33183319        while(fAct!=NULL )//&& ii < bound )
    33193320        {
    3320                 intvec *fNormal;
     3321                int64vec *fNormal;
    33213322                fNormal = fAct->getFacetNormal();
    33223323                for(int jj=0;jj<this->numVars;jj++)
  • kernel/gfan.h

    r4b3ef4b ra355e47  
    1313
    1414#include "intvec.h"
     15#include "int64vec.h"
    1516
    1617#define p800
     
    3435lists gfan(ideal inputIdeal, int heuristic);
    3536
    36 //int dotProduct(intvec a, intvec b);
    37 //bool isParallel(intvec a, intvec b);
     37//int dotProduct(int64vec a, int64vec b);
     38//bool isParallel(int64vec a, int64vec b);
    3839
    3940class facet
     
    4142        private:
    4243                /** \brief Inner normal of the facet, describing it uniquely up to isomorphism */
    43                 intvec *fNormal;
     44                int64vec *fNormal;
    4445               
    4546                /** \brief An interior point of the facet*/
    46                 intvec *interiorPoint;
     47                int64vec *interiorPoint;
    4748               
    4849                /** \brief Universal Cone Number
     
    8990                /** \brief Comparison of facets*/
    9091                inline bool areEqual(facet *f, facet *g);
    91                 /** Stores the facet normal \param intvec*/
    92                 inline void setFacetNormal(intvec *iv);
     92                /** Stores the facet normal \param int64vec*/
     93                inline void setFacetNormal(int64vec *iv);
    9394                /** Hopefully returns the facet normal */
    94                 inline intvec *getFacetNormal();
     95                inline int64vec *getFacetNormal();
    9596                /** Method to print the facet normal*/
    9697                inline void printNormal();
     
    108109                inline int getUCN();
    109110                /** Store an interior point of the facet */
    110                 inline void setInteriorPoint(intvec *iv);
    111                 inline intvec *getInteriorPoint();
     111                inline void setInteriorPoint(int64vec *iv);
     112                inline int64vec *getInteriorPoint();
    112113                /** \brief Debugging function
    113114                 * prints the facet normal an all (codim-2)-facets that belong to it
     
    130131                ideal inputIdeal;       //the original
    131132                ring baseRing;          //the basering of the cone                             
    132                 intvec *ivIntPt;        //an interior point of the cone
     133                int64vec *ivIntPt;      //an interior point of the cone
    133134                int UCN;                //unique number of the cone
    134135                int pred;               //UCN of the cone this one is derived from
     
    188189                inline int getCounter();
    189190                inline ring getBaseRing();
    190                 inline void setIntPoint(intvec *iv);
    191                 inline intvec *getIntPoint();
     191                inline void setIntPoint(int64vec *iv);
     192                inline int64vec *getIntPoint();
    192193                inline void showIntPoint();
    193194                inline void setNumFacets();
     
    200201                inline void invPrint(const ideal &I);
    201202                inline bool isMonomial(const ideal &I);
    202                 inline intvec *ivNeg(const intvec *iv);
    203                 inline int dotProduct(const intvec &iva, const intvec &ivb);
    204                 inline bool isParallel(const intvec &a, const intvec &b);
    205                 inline bool areEqual(const intvec &a, const intvec &b);
     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);
    206207                inline bool areEqual(facet *f, facet *g);
    207208                inline int intgcd(int a, int b);
    208209                inline void writeConeToFile(const gcone &gc, bool usingIntPoints=FALSE);
    209210                inline void readConeFromFile(int gcNum, gcone *gc);
    210                 inline intvec f2M(gcone *gc, facet *f, int n=1);
     211                inline int64vec f2M(gcone *gc, facet *f, int n=1);
    211212                inline void sortRays(gcone *gc);
    212213                //The real stuff
     
    215216                inline void getExtremalRays(const gcone &gc);
    216217                inline void flip(ideal gb, facet *f);
    217                 inline void computeInv(ideal &gb, ideal &inv, intvec &f);
     218                inline void computeInv(ideal &gb, ideal &inv, int64vec &f);
    218219//              poly restOfDiv(poly const &f, ideal const &I); removed with r12286
    219220                inline ideal ffG(const ideal &H, const ideal &G);
    220221                inline void getGB(ideal const &inputIdeal);             
    221                 inline void interiorPoint( dd_MatrixPtr &M, intvec &iv);
    222                 inline void interiorPoint2(const dd_MatrixPtr &M, intvec &iv);
     222                inline void interiorPoint( dd_MatrixPtr &M, int64vec &iv);
     223                inline void interiorPoint2(const dd_MatrixPtr &M, int64vec &iv);
    223224                inline void preprocessInequalities(dd_MatrixPtr &M);
    224                 ring rCopyAndAddWeight(const ring &r, const intvec *ivw);
    225                 ring rCopyAndChangeWeight(const ring &r, intvec *ivw);         
     225                ring rCopyAndAddWeight(const ring &r, int64vec *ivw);
     226                ring rCopyAndChangeWeight(const ring &r, int64vec *ivw);               
    226227//              void reverseSearch(gcone *gcAct); //NOTE both removed from r12286
    227228//              bool isSearchFacet(gcone &gcTmp, facet *testfacet);
    228229                void noRevS(gcone &gcRoot, bool usingIntPoint=FALSE);
    229                 inline void makeInt(const dd_MatrixPtr &M, const int line, intvec &n);
     230                inline void makeInt(const dd_MatrixPtr &M, const int line, int64vec &n);
    230231                inline void normalize();
    231232                facet * enqueueNewFacets(facet *f);
Note: See TracChangeset for help on using the changeset viewer.