MCPcopy Create free account
hub / github.com/Singular/Singular / insert

Method insert

kernel/GBEngine/f5lists.cc:37–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 return this->next;
36}
37PNode* PNode::insert(poly p) {
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}
66/*
67PNode* PNode::insert(poly p) {
68 PNode* pn = new PNode(p,this);

Callers 10

insert_into_cache_termFunction · 0.45
F5incFunction · 0.45
criticalPairFunction · 0.45
criticalPair2Function · 0.45
computeSPolsFunction · 0.45
findReducersFunction · 0.45
topReductionFunction · 0.45
findReductorFunction · 0.45
F5mainFunction · 0.45
noro_red_monFunction · 0.45

Calls 5

getDegMethod · 0.80
getPolyMethod · 0.45
getNextMethod · 0.45
getT1Method · 0.45
getLp1TermMethod · 0.45

Tested by

no test coverage detected