Changeset f9db28 in git for kernel/gfan.cc


Ignore:
Timestamp:
Apr 27, 2009, 4:39:52 PM (15 years ago)
Author:
Martin Monerjan
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c8e7d30a5e816b0f667c4b17450162f5f75dca54
Parents:
99b3e4240d7eab99ea8b32817b9144e179f3f495
Message:
Copy constructor for gcone
class gcone is now friend of class facet. Ugly - find other way to do this
method facet::getFlipGB


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

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    r99b3e42 rf9db28  
    22Compute the Groebner fan of an ideal
    33$Author: monerjan $
    4 $Date: 2009-04-24 15:23:16 $
    5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.39 2009-04-24 15:23:16 monerjan Exp $
    6 $Id: gfan.cc,v 1.39 2009-04-24 15:23:16 monerjan Exp $
     4$Date: 2009-04-27 14:39:52 $
     5$Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.40 2009-04-27 14:39:52 monerjan Exp $
     6$Id: gfan.cc,v 1.40 2009-04-27 14:39:52 monerjan Exp $
    77*/
    88
     
    112112                }
    113113               
     114                /** Return the flipped GB*/
     115                ideal getFlipGB()
     116                {
     117                        return this->flipGB;
     118                }
     119               
    114120                /** Print the flipped GB*/
    115121                void printFlipGB()
     
    121127                bool isIncoming;        //Is the facet incoming or outgoing?
    122128                facet *next;            //Pointer to next facet
     129               
     130                friend class gcone;     //Bad style
    123131};
    124132
     
    138146                ring rootRing;          //good to know this -> generic walk
    139147                ideal inputIdeal;       //the original
     148                /* TODO in order to save memory use pointers to rootRing and inputIdeal instead */
    140149        public:
    141150                /** \brief Default constructor.
     
    162171                }
    163172               
     173                /** \brief Copy constructor
     174                *
     175                * Copies one cone, forgets about everything but the facetNormal
     176                */                     
     177                gcone(gcone& gc)               
     178                {
     179                        this->next=NULL;
     180                        facet *f=this->facetPtr;
     181                        f->fNormal=gc.facetPtr->getFacetNormal();
     182                        this->gcBasis=gc.facetPtr->getFlipGB();
     183                       
     184                        /*Reverse direction of the facet normal*/                       
     185                        intvec *foo=f->getFacetNormal();
     186                        for (int ii=0; ii<this->numVars;ii++)
     187                        {
     188                                (*foo)[ii]=-(*foo)[ii];
     189                                //(*f).(*fNormal)[ii]=-( (*f).(*fNormal)[ii]);
     190                        }
     191                        f->setFacetNormal(foo);
     192                }
     193               
     194                /** \brief Default destructor */
    164195                ~gcone();               //destructor
    165196               
    166197                /** Pointer to the first facet */
    167198                facet *facetPtr;        //Will hold the adress of the first facet; set by gcone::getConeNormals
    168                 poly gcMarkedTerm;      //marked terms of the cone's Groebner basis
     199               
    169200                /** # of variables in the ring */
    170201                int numVars;            //#of variables in the ring
     
    451482                                initialForm->m[ii]=initialFormElement[ii];
    452483                        }//for
    453                         f->setFlipGB(initialForm);      //FIXME PROBABLY WRONG TO STORE HERE SINCE INA!=flibGB                 
     484                        //f->setFlipGB(initialForm);    //FIXME PROBABLY WRONG TO STORE HERE SINCE INA!=flibGB                 
    454485#ifdef gfan_DEBUG
    455486                        cout << "Initial ideal is: " << endl;
    456487                        idShow(initialForm);
    457                         f->printFlipGB();
     488                        //f->printFlipGB();
    458489                        cout << "===" << endl;
    459490#endif
     
    683714                       
    684715                        f->setFlipGB(dstRing_I);//store the flipped GB
     716#ifdef gfan_DEBUG
     717                        cout << "Flipped GB is: " << endl;
    685718                        f->printFlipGB();
     719#endif
    686720                       
    687721                }//void flip(ideal gb, facet *f)
     
    798832                }//void getGB
    799833               
    800                 ideal GenGrbWlk(ideal, ideal);  //Implementation of the Generic Groebner Walk. Needed for a) Computing the sink and b) finding search facets
     834                /** \brief The Generic Groebner Walk due to FJLT
     835                * Needed for computing the search facet
     836                */
     837                ideal GenGrbWlk(ideal, ideal)
     838                {
     839                }//GGW
    801840
    802841
     
    9611000        rootRing=rCopy0(currRing);
    9621001        rootRing->order[0]=ringorder_lp;
     1002        //NOTE: Build ring accordiing to rCopyAndChangeWeight
    9631003        /*rootRing->order[0]=ringorder_a;
    9641004        rootRing->order[1]=ringorder_lp;
     
    9931033        /*Now it is time to compute the search facets, respectively start the reverse search.
    9941034        But since we are in the root all facets should be search facets. IS THIS TRUE?
    995         MIND: AS OF NOW, THE LIST OF FACETS IS NOT PURGED OF NON-FLIPPAPLE FACETS
     1035        NOTE: Check for flippability is not very sophisticated
    9961036        */
    9971037       
Note: See TracChangeset for help on using the changeset viewer.