Changeset 54248e in git for kernel


Ignore:
Timestamp:
Mar 26, 2009, 11:30:21 AM (15 years ago)
Author:
Martin Monerjan
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
Children:
a9431ce0768900f372ea152334160e89ebab527c
Parents:
9f9b142893198e383bb306d720e6dcb4e2da44ce
Message:
Got methods printNormal() and setFacetNormal(intvec *iv) of class facet to work.
Initialisation of rings needs more work. This rev will not compile


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

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    r9f9b142 r54248e  
    22Compute the Groebner fan of an ideal
    33$Author: monerjan $
    4 $Date: 2009-03-25 19:55:50 $
    5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.21 2009-03-25 19:55:50 monerjan Exp $
    6 $Id: gfan.cc,v 1.21 2009-03-25 19:55:50 monerjan Exp $
     4$Date: 2009-03-26 10:30:21 $
     5$Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.22 2009-03-26 10:30:21 monerjan Exp $
     6$Id: gfan.cc,v 1.22 2009-03-26 10:30:21 monerjan Exp $
    77*/
    88
     
    1919
    2020//Hacks for different working places
    21 #define HOME
     21#define ITWM
    2222
    2323#ifdef UNI
     
    5151        private:
    5252                /** inner normal, describing the facet uniquely  */
    53                 intvec fNormal;         
     53                intvec *fNormal;               
    5454        public:
    5555                /** The default constructor. Do I need a constructor of type facet(intvec)? */
    5656                facet()                 
    5757                {
    58                         //fNormal = FN;
    5958                        // Pointer to next facet.  */
    6059                        /* Defaults to NULL. This way there is no need to check explicitly */
     
    6564                ~facet(){;}
    6665               
    67                 void setFacetNormal(intvec iv){
     66                /** Stores the facet normal \param intvec*/
     67                void setFacetNormal(intvec *iv){
    6868                        fNormal = iv;
    69                         return;
     69                        //return;
     70                }
     71               
     72                /** Method to print the facet normal*/
     73                void printNormal()
     74                {
     75                        fNormal->show();
    7076                }
    7177               
     
    8894
    8995        public:
     96                gcone()
     97                {
     98                        this->next=NULL;
     99                        this->facetPtr=NULL;
     100                }
    90101                gcone(int);             //constructor with dimension
    91102                ~gcone();               //destructor
     103                facet *facetPtr;        //Will hold the adress of the first facet
    92104                poly gcMarkedTerm;      //marked terms of the cone's Groebner basis
    93105                ideal gcBasis;          //GB of the cone
     
    249261       
    250262       
    251         /*Write the normals into class facet
    252                 How do I get the #rows in ddineq? \exists s.th. like dd_NumRows? dd_get_si(ddineq->matrix[i][j]) ?
    253         Strange enough: facet *f=new facet(intvec(2,3)) does work for the constructor facet(intvec FN){fNormal = FN;}
    254         */
     263        /*Write the normals into class facet*/
    255264        #ifdef gfan_DEBUG
    256265        cout << "Creating list of normals" << endl;
     
    264273        for (int kk = 0; kk<ddrows; kk++)
    265274        {
    266                 intvec load;    //intvec to sto
     275                intvec *load = new intvec(numvar);      //intvec to store a single facet normal that will then be stored via setFacetNormal
    267276                for (int jj = 1; jj <ddcols; jj++)
    268277                {
     
    273282#endif
    274283                        /*next two lines commented out. How to store values into intvec? */
    275                         //load[jj] = (int)*foo;                 //store typecasted entry at pos jj of load
     284                        (*load)[jj-1] = (int)*foo;              //store typecasted entry at pos jj-1 of load
    276285                        //fAct->setFacetNormal(load);
    277286                        //check for flipability here
     
    281290                                fAct = fAct->next;              //scary :)
    282291                        }
    283                 }
     292                }//for jj<ddcols
     293                /*Now load should be full and we can call setFacetNormal*/
     294                fAct->setFacetNormal(load);
     295                fAct->printNormal();
    284296        }
    285297        /*
     
    304316ideal gfan(ideal inputIdeal)
    305317{
     318        int numvar = pVariables;
     319       
    306320        #ifdef gfan_DEBUG
    307321        cout << "Now in subroutine gfan" << endl;
    308322        #endif
    309323        ring rootRing;  // The ring associated to the target ordering
     324        rRingOrder_t t=ringorder_dp;
     325       
    310326        ideal res;
    311327        matrix ineq; //Matrix containing the boundary inequalities
     
    314330       
    315331        rootRing=rCopy0(currRing);
     332        rootRing=rInit(0,numvar,t);
    316333        rComplete(rootRing);
    317334        rChangeCurrRing(rootRing);
Note: See TracChangeset for help on using the changeset viewer.