Changeset 9cb4078 in git for kernel/f5data.h


Ignore:
Timestamp:
Mar 4, 2009, 9:23:05 PM (15 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
fe880793d1fe5f78cc5038ae512e18c6cbaab42c
Parents:
fcef59fcd75c37051211c94b3423f0d319602d9d
Message:
implemented interreduction, still with lots of bugs => commented out


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

Legend:

Unmodified
Added
Removed
  • kernel/f5data.h

    rfcef59 r9cb4078  
     1//! \file f5data.cc
    12/****************************************
    23*  Computer Algebra System SINGULAR     *
    34****************************************/
    4 /* $Id: f5data.h,v 1.7 2009-02-19 14:52:34 ederc Exp $ */
     5/* $Id: f5data.h,v 1.8 2009-03-04 20:23:05 ederc Exp $ */
    56/*
    67* ABSTRACT: labeled polynomial interface
     
    910#define F5DATA_HEADER
    1011#ifdef HAVE_F5
    11 /*
     12/*!
    1213=========================================================
    1314=========================================================
     
    2122
    2223
    23 /*
     24/*!
    2425============================
    2526class of labeled polynomials
     
    3334        Rule*   _rule;
    3435    public:
    35                 LPoly(poly t, int i, poly p, Rule* r=NULL);
    36         void    setPoly(poly p);
    37         poly    getPoly();
    38         void    setTerm(poly t);
    39         poly    getTerm();
    40         void    setIndex(int i);
    41         int     getIndex();
    42         void    setRule(Rule* r);
    43         Rule*   getRule();
    44         void    set(poly t, int i, poly p, Rule* r);
    45         LPoly*  get();
     36        inline          LPoly(poly t, int i, poly p, Rule* r=NULL);
     37        inline  void    setPoly(poly p);
     38        inline  poly    getPoly();
     39        inline  void    setTerm(poly t);
     40        inline  poly    getTerm();
     41        inline  void    setIndex(int i);
     42        inline  int     getIndex();
     43        inline  void    setRule(Rule* r);
     44        inline  Rule*   getRule();
     45        inline  void    set(poly t, int i, poly p, Rule* r);
     46        inline  LPoly*  get();
    4647};
    4748
    48 /*
     49LPoly::LPoly(poly t,int i,poly p, Rule* r) {
     50    set(t,i,p,r);
     51}
     52
     53void LPoly::setPoly(poly p)  {
     54    //poly _p     =   pInit();
     55    //_p          =   pCopy(p);
     56    polynomial = p;
     57}
     58
     59void LPoly::setTerm(poly t) {
     60    //poly _t     =   pInit();
     61    //_t          =   pCopy(t);
     62    term = t;
     63}
     64
     65void LPoly::setIndex(int i) {
     66    index = i;
     67}
     68
     69void LPoly::setRule(Rule* r) {
     70    _rule   =   r;
     71}
     72
     73poly LPoly::getPoly() {
     74    return polynomial;
     75}
     76
     77poly LPoly::getTerm() {
     78    return term;
     79}
     80
     81int LPoly::getIndex() {
     82    return index;
     83}
     84
     85Rule* LPoly::getRule() {
     86    return _rule;
     87}
     88
     89void LPoly::set(poly t, int i, poly p, Rule* r) {
     90    this->setTerm(t);
     91    this->setIndex(i);
     92    this->setPoly(p);
     93    this->setRule(r);
     94}
     95
     96LPoly* LPoly::get() {
     97    return this;
     98}
     99
     100
     101/*!
    49102===================================
    50103structure of labeled critical pairs
     
    60113        Rule*   testedRule;     // already tested by rules up to lastRuleTested
    61114    public:
    62                 CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2, Rule* r = NULL);
    63         long    getDeg();
    64         poly    getT1();
    65         poly*   getAdT1();
    66         LPoly*  getAdLp1();
    67         poly    getLp1Poly();
    68         poly    getLp1Term();
    69         int     getLp1Index();
    70         poly    getT2();
    71         poly*   getAdT2();
    72         LPoly*  getAdLp2();
    73         poly    getLp2Poly();
    74         poly    getLp2Term();
    75         int     getLp2Index();
    76         Rule*   getTestedRule();
    77         void    setTestedRule(Rule* r);
     115        inline          CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2, Rule* r = NULL);
     116        inline  long    getDeg();
     117        inline  poly    getT1();
     118        inline  poly*   getAdT1();
     119        inline  LPoly*  getAdLp1();
     120        inline  poly    getLp1Poly();
     121        inline  poly    getLp1Term();
     122        inline  int     getLp1Index();
     123        inline  poly    getT2();
     124        inline  poly*   getAdT2();
     125        inline  LPoly*  getAdLp2();
     126        inline  poly    getLp2Poly();
     127        inline  poly    getLp2Term();
     128        inline  int     getLp2Index();
     129        inline  Rule*   getTestedRule();
     130        inline  void    setTestedRule(Rule* r);
    78131};
    79132
    80 
    81 /*
     133CPair::CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2, Rule* r) {
     134   deg              =   degree;
     135   t1               =   term1;
     136   lp1              =   lpoly1;
     137   t2               =   term2;
     138   lp2              =   lpoly2;
     139   testedRule       =   r;
     140}
     141
     142long CPair::getDeg() {
     143    return deg;
     144}
     145
     146poly CPair::getT1() {
     147    return t1;
     148}
     149
     150poly* CPair::getAdT1() {
     151    return &t1;
     152}
     153
     154poly* CPair::getAdT2() {
     155    return &t2;
     156}
     157
     158poly CPair::getT2() {
     159    return t2;
     160}
     161
     162LPoly* CPair::getAdLp1() {
     163    return lp1;
     164}
     165
     166LPoly* CPair::getAdLp2() {
     167    return lp2;
     168}
     169
     170poly CPair::getLp1Poly() {
     171    return lp1->getPoly();
     172}
     173
     174poly CPair::getLp2Poly() {
     175    return lp2->getPoly();
     176}
     177
     178poly CPair::getLp1Term() {
     179    return lp1->getTerm();
     180}
     181
     182poly CPair::getLp2Term() {
     183    return lp2->getTerm();
     184}
     185
     186int CPair::getLp1Index() {
     187    return lp1->getIndex();
     188}
     189
     190int CPair::getLp2Index() {
     191    return lp2->getIndex();
     192}
     193
     194Rule* CPair::getTestedRule() {
     195    return testedRule;
     196}
     197
     198void CPair::setTestedRule(Rule* r) {
     199    testedRule      =   r;
     200}
     201
     202
     203/*!
    82204========================================================
    83205structure of rules(i.e. already computed / known labels)
     
    89211        poly    term;       // term of the labeled polynomial the rule comes from
    90212    public:
    91                 Rule(int i, poly term);
    92         int     getIndex();
    93         poly    getTerm();
     213        inline          Rule(int i, poly term);
     214        inline  int     getIndex();
     215        inline  poly    getTerm();
    94216};
     217
     218Rule::Rule(int i, poly t) {
     219    index   =   i;
     220    term    =   t;
     221}
     222
     223int Rule::getIndex() {
     224    return index;
     225}
     226
     227poly Rule::getTerm() {
     228    return term;
     229}
    95230#endif
    96231#endif
Note: See TracChangeset for help on using the changeset viewer.