Changeset cd7c3e1 in git


Ignore:
Timestamp:
Dec 26, 2008, 2:52:15 PM (14 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
Children:
db0c26499ac93c779f02182a98792ec615793f61
Parents:
d72b11bc8b23f633cdb4f322bbbbab31c23597cb
Message:
fitting to lists.h


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

Legend:

Unmodified
Added
Removed
  • kernel/lpolynomial.cc

    rd72b11 rcd7c3e1  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: lpolynomial.cc,v 1.2 2008-11-27 17:18:45 ederc Exp $ */
     4/* $Id: lpolynomial.cc,v 1.3 2008-12-26 13:51:50 ederc Exp $ */
    55/*
    66* ABSTRACT: lpolynomial definition
     
    2424#include "f5gb.h"
    2525#include "lpolynomial.h"
    26 #include "lplist.h"
     26#include "lists.h"
    2727/*
    2828================================================================
     
    3030================================================================
    3131*/
    32 void LPoly::setPoly(poly p)
     32void LPoly::setPoly(poly* p)
    3333{
    34     polynomial = p;
     34    polynomial = *p;
    3535}
    3636
    37 void LPoly::setTerm(poly t) {
    38     term = t;
     37void LPoly::setTerm(poly* t) {
     38    term = *t;
    3939}
    4040
    41 void LPoly::setIndex(long i) {
    42     index = i;
     41void LPoly::setIndex(long* i) {
     42    index = *i;
    4343}
    4444
     
    4848}
    4949
    50 void LPoly::setNext(LPoly* l) {
    51     next = l;
    52 }
    53 
    54 poly LPoly::getPoly() {
     50poly LPoly::getPoly() const {
    5551    return polynomial;
    5652}
    5753
    58 poly LPoly::getTerm() {
     54poly LPoly::getTerm() const {
    5955    return term;
    6056}
    6157
    62 long LPoly::getIndex() {
     58long LPoly::getIndex() const {
    6359    return index;
    6460}
    6561
    66 bool LPoly::getDel() {
     62bool LPoly::getDel() const {
    6763    return del;
    6864}
    6965
    70 LPoly* LPoly::getNext() {
    71     return next;
     66void LPoly::set(poly* t, long* i, poly* p) {
     67    this->setTerm(t);
     68    this->setIndex(i);
     69    this->setPoly(p);
    7270}
    7371
     
    7775=====================================================
    7876*/
    79 int LPoly::compare(const LPoly& lp) {
     77int LPoly::compare(const LPoly& lp) const {
    8078    if(index > lp.index) {
    8179        return 1;
     
    8785}
    8886
    89 void LPoly::get() {
    90     Print("Label: ");
    91     pWrite(getTerm());
    92     Print("  %d\n",getIndex());
     87LPoly* LPoly::get() {
     88    return this;
    9389}
    9490#endif
  • kernel/lpolynomial.h

    rd72b11 rcd7c3e1  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: lpolynomial.h,v 1.2 2008-11-27 17:19:22 ederc Exp $ */
     4/* $Id: lpolynomial.h,v 1.3 2008-12-26 13:52:15 ederc Exp $ */
    55/*
    66* ABSTRACT: labeled polynomial interface
     
    1212
    1313
    14 // class of a labeled polynomial
     14/*
     15=============================
     16class of a labeled polynomial
     17=============================
     18*/
    1519class LPoly
    1620{
     
    2024                poly    polynomial; //standard polynomial data
    2125                bool    del; //for deletion in TopReduction Subalgorithm
    22                 LPoly   *next; //pointer on the next labeled polynomial in the list
    2326        public:
    24                 void    setPoly(poly p);
    25                 poly    getPoly();
    26                 void    setTerm(poly t);
    27                 poly    getTerm();
    28                 void    setIndex(long i);
    29                 long    getIndex();
     27                void    setPoly(poly* p);
     28                poly    getPoly() const;
     29                void    setTerm(poly* t);
     30                poly    getTerm() const;
     31                void    setIndex(long* i);
     32                long    getIndex() const;
    3033                void    setDel(bool b);
    31                 bool    getDel();
    32                 void    setNext(LPoly *l);
    33                 LPoly   *getNext();
    34                 int     compare(const LPoly& lp);
    35                 void    get();
     34                bool    getDel() const;
     35                int     compare(const LPoly& lp) const;
     36                void    set(poly* t, long* i, poly* p);
     37                LPoly*  get();
    3638};
    3739
    3840
    39 // structure of the critical pairs, just the addresses of the corresponding generator labeled polynomials
    40 struct critpair
     41/*
     42===============================
     43structure of the critical pairs
     44===============================
     45*/
     46struct CPair
    4147{
    42         LPoly       *cp1;   // first  component
    43         LPoly       *cp2;   // second component
    44         critpair    *next;  // next critical pair
     48        LPoly*  cp1;   // first  component
     49        LPoly*  cp2;   // second component
    4550};
    4651
     
    4853#endif
    4954#endif
    50 
    51 
Note: See TracChangeset for help on using the changeset viewer.