Public Member Functions | Private Attributes
PNode Class Reference

class PNode of nodes of polynomials More...

#include <f5lists.h>

Public Member Functions

 PNode (poly p, PNode *n)
 functions working on the class PNode More...
 
poly getPoly ()
 
PNodegetNext ()
 
PNodeinsert (poly p)
 

Private Attributes

poly data
 
PNodenext
 

Detailed Description

class PNode of nodes of polynomials

Definition at line 36 of file f5lists.h.

Constructor & Destructor Documentation

PNode::PNode ( poly  p,
PNode n 
)

functions working on the class PNode

Definition at line 26 of file f5lists.cc.

26  {
27  data = p;
28  next = n;
29 }
return P p
Definition: myNF.cc:203
poly data
Definition: f5lists.h:38
PNode * next
Definition: f5lists.h:39

Member Function Documentation

PNode * PNode::getNext ( )

Definition at line 35 of file f5lists.cc.

35  {
36  return this->next;
37 }
PNode * next
Definition: f5lists.h:39
poly PNode::getPoly ( )

Definition at line 31 of file f5lists.cc.

31  {
32  return this->data;
33 }
poly data
Definition: f5lists.h:38
PNode * PNode::insert ( poly  p)

Definition at line 38 of file f5lists.cc.

38  {
39  poly q = pOne();
40  q = pCopy(p);
41  PNode* temp = this;
42  if(NULL == temp) {
43  PNode* pn = new PNode(q,temp);
44  return pn;
45  }
46  if(1 == pLmCmp(q,temp->getPoly())) {
47  PNode* pn = new PNode(q,temp);
48  return pn;
49  }
50  if(0 == pLmCmp(q,temp->getPoly())) {
51  return this;
52  }
53  if(-1 == pLmCmp(q,temp->getPoly())) {
54  while(NULL != temp->getNext() && -1 == pLmCmp(q,temp->getNext()->getPoly())) {
55  temp = temp->getNext();
56  }
57  if(NULL == temp->getNext() || 1 == pLmCmp(q,temp->getNext()->getPoly())) {
58  PNode* pn = new PNode(q,temp->getNext());
59  temp->next = pn;
60  return this;
61  }
62  if(0 == pLmCmp(q,temp->getNext()->getPoly())) {
63  return this;
64  }
65  }
66 }
PNode(poly p, PNode *n)
functions working on the class PNode
Definition: f5lists.cc:26
class PNode of nodes of polynomials
Definition: f5lists.h:36
poly getPoly()
Definition: f5lists.cc:31
return P p
Definition: myNF.cc:203
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
Definition: polys.h:105
PNode * getNext()
Definition: f5lists.cc:35
#define pOne()
Definition: polys.h:286
PNode * next
Definition: f5lists.h:39
#define NULL
Definition: omList.c:10
polyrec * poly
Definition: hilb.h:10
#define pCopy(p)
return a copy of the poly
Definition: polys.h:156

Field Documentation

poly PNode::data
private

Definition at line 38 of file f5lists.h.

PNode* PNode::next
private

Definition at line 39 of file f5lists.h.


The documentation for this class was generated from the following files: