My Project
Loading...
Searching...
No Matches
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::PNode ( poly  p,
PNode n 
)

functions working on the class PNode

Definition at line 25 of file f5lists.cc.

25 {
26 data = p;
27 next = n;
28}
int p
Definition: cfModGcd.cc:4078
poly data
Definition: f5lists.h:38
PNode * next
Definition: f5lists.h:39

Member Function Documentation

◆ getNext()

PNode * PNode::getNext ( )

Definition at line 34 of file f5lists.cc.

34 {
35 return this->next;
36}

◆ getPoly()

poly PNode::getPoly ( )

Definition at line 30 of file f5lists.cc.

30 {
31 return this->data;
32}

◆ insert()

PNode * PNode::insert ( poly  p)

Definition at line 37 of file f5lists.cc.

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

Field Documentation

◆ data

poly PNode::data
private

Definition at line 38 of file f5lists.h.

◆ next

PNode* PNode::next
private

Definition at line 39 of file f5lists.h.


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