My Project  UNKNOWN_GIT_VERSION
Public Member Functions | Private Attributes
LList Class Reference

#include <f5lists.h>

Public Member Functions

 LList ()
 
 LList (LPolyOld *lp)
 
 LList (poly t, int i, poly p, RuleOld *r=NULL)
 
 ~LList ()
 
void insert (LPolyOld *lp)
 
void insert (poly t, int i, poly p, RuleOld *r=NULL)
 
void insertByDeg (LPolyOld *lp)
 
void insertSP (LPolyOld *lp)
 
void insertSP (poly t, int i, poly p, RuleOld *r=NULL)
 
void insertByLabel (poly t, int i, poly p, RuleOld *r=NULL)
 
void insertByLabel (LNode *l)
 
void insertFirst (LNode *l)
 
void deleteByDeg ()
 
bool polyTest (poly *p)
 
LNodegetFirst ()
 
LNodegetLast ()
 
int getLength ()
 
void setFirst (LNode *l)
 
void print ()
 
int count (LNode *l)
 

Private Attributes

LNodefirst
 
LNodelast
 
int length
 

Detailed Description

Definition at line 126 of file f5lists.h.

Constructor & Destructor Documentation

◆ LList() [1/3]

LList::LList ( )

Definition at line 430 of file f5lists.cc.

430  {
431  first = last = NULL;;
432  length = 0;
433 }

◆ LList() [2/3]

LList::LList ( LPolyOld lp)

Definition at line 435 of file f5lists.cc.

435  {
436  first = new LNode(lp);
437  last = first;
438  length = 1;
439 }

◆ LList() [3/3]

LList::LList ( poly  t,
int  i,
poly  p,
RuleOld r = NULL 
)

Definition at line 441 of file f5lists.cc.

441  {
442  first = new LNode(t,i,p,r);
443  last = first;
444  length = 1;
445 }

◆ ~LList()

LList::~LList ( )

Definition at line 447 of file f5lists.cc.

447  {
448  LNode* temp;
449  while(first) {
450  temp = first;
451  first = first->getNext();
452  delete temp;
453  //Print("%p\n",first);
454  }
455 }

Member Function Documentation

◆ count()

int LList::count ( LNode l)

Definition at line 543 of file f5lists.cc.

543  {
544  return first->count(l);
545 }

◆ deleteByDeg()

void LList::deleteByDeg ( )

Definition at line 512 of file f5lists.cc.

512  {
513  first = first->deleteByDeg();
514 }

◆ getFirst()

LNode * LList::getFirst ( )

Definition at line 520 of file f5lists.cc.

520  {
521  return first;
522 }

◆ getLast()

LNode * LList::getLast ( )

Definition at line 524 of file f5lists.cc.

524  {
525  return last;
526 }

◆ getLength()

int LList::getLength ( )

Definition at line 528 of file f5lists.cc.

528  {
529  return length;
530 }

◆ insert() [1/2]

void LList::insert ( LPolyOld lp)

Definition at line 458 of file f5lists.cc.

458  {
459  last = last->insert(lp);
460  if(NULL == first) {
461  first = last;
462  }
463  //Print("NEW LAST GPREV: ");
464  //pWrite(last->getPoly());
465  //Print("%p\n",first);
466  //pWrite(first->getPoly());
467  length++;
468  //Print("LENGTH %d\n",length);
469 }

◆ insert() [2/2]

void LList::insert ( poly  t,
int  i,
poly  p,
RuleOld r = NULL 
)

Definition at line 471 of file f5lists.cc.

471  {
472  last = last->insert(t,i,p,r);
473  if(NULL == first) {
474  first = last;
475  }
476  length++;
477  //Print("LENGTH %d\n",length);
478 }

◆ insertByDeg()

void LList::insertByDeg ( LPolyOld lp)

◆ insertByLabel() [1/2]

void LList::insertByLabel ( LNode l)

Definition at line 506 of file f5lists.cc.

506  {
508  length++;
509  //Print("LENGTH %d\n",length);
510 }

◆ insertByLabel() [2/2]

void LList::insertByLabel ( poly  t,
int  i,
poly  p,
RuleOld r = NULL 
)

Definition at line 494 of file f5lists.cc.

494  {
495  first = first->insertByLabel(t,i,p,r);
496  length++;
497  //Print("LENGTH %d\n",length);
498 }

◆ insertFirst()

void LList::insertFirst ( LNode l)

Definition at line 500 of file f5lists.cc.

500  {
501  first = first->insertFirst(l);
502  length++;
503  //Print("LENGTH %d\n",length);
504 }

◆ insertSP() [1/2]

void LList::insertSP ( LPolyOld lp)

Definition at line 481 of file f5lists.cc.

481  {
482  first = first->insertSP(lp);
483  length++;
484  //Print("LENGTH %d\n",length);
485 }

◆ insertSP() [2/2]

void LList::insertSP ( poly  t,
int  i,
poly  p,
RuleOld r = NULL 
)

Definition at line 487 of file f5lists.cc.

487  {
488  first = first->insertSP(t,i,p,r);
489  length++;
490  //Print("LENGTH %d\n",length);
491 }

◆ polyTest()

bool LList::polyTest ( poly *  p)

Definition at line 516 of file f5lists.cc.

516  {
517  return first->polyTest(p);
518 }

◆ print()

void LList::print ( )

Definition at line 539 of file f5lists.cc.

539  {
540  first->print();
541 }

◆ setFirst()

void LList::setFirst ( LNode l)

Definition at line 532 of file f5lists.cc.

532  {
533  LNode* temp = first;
534  temp->setNext(NULL);
535  first = l;
536  length--;
537 }

Field Documentation

◆ first

LNode* LList::first
private

Definition at line 128 of file f5lists.h.

◆ last

LNode* LList::last
private

Definition at line 129 of file f5lists.h.

◆ length

int LList::length
private

Definition at line 130 of file f5lists.h.


The documentation for this class was generated from the following files:
LList::first
LNode * first
Definition: f5lists.h:128
LList::last
LNode * last
Definition: f5lists.h:129
i
int i
Definition: cfEzgcd.cc:125
LNode::insert
LNode * insert(LPolyOld *lp)
Definition: f5lists.cc:179
LNode::count
int count(LNode *l)
Definition: f5lists.cc:409
LNode
Definition: f5lists.h:64
LNode::deleteByDeg
LNode * deleteByDeg()
Definition: f5lists.cc:317
NULL
#define NULL
Definition: omList.c:9
LNode::insertFirst
LNode * insertFirst(LNode *l)
Definition: f5lists.cc:266
l
int l
Definition: cfEzgcd.cc:93
LNode::polyTest
bool polyTest(poly *p)
Definition: f5lists.cc:378
LNode::getNext
LNode * getNext()
Definition: f5lists.cc:322
LList::length
int length
Definition: f5lists.h:130
p
int p
Definition: cfModGcd.cc:4019
LNode::insertSP
LNode * insertSP(LPolyOld *lp)
Definition: f5lists.cc:207
LNode::setNext
void setNext(LNode *l)
Definition: f5lists.cc:369
LNode::print
void print()
Definition: f5lists.cc:394
LNode::insertByLabel
LNode * insertByLabel(poly t, int i, poly p, RuleOld *r)
Definition: f5lists.cc:222