My Project
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 127 of file f5lists.h.

Constructor & Destructor Documentation

◆ LList() [1/3]

LList::LList ( )

Definition at line 429 of file f5lists.cc.

429  {
430  first = last = NULL;;
431  length = 0;
432 }
LNode * last
Definition: f5lists.h:130
int length
Definition: f5lists.h:131
LNode * first
Definition: f5lists.h:129
#define NULL
Definition: omList.c:12

◆ LList() [2/3]

LList::LList ( LPolyOld lp)

Definition at line 434 of file f5lists.cc.

434  {
435  first = new LNode(lp);
436  last = first;
437  length = 1;
438 }
Definition: f5lists.h:65

◆ LList() [3/3]

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

Definition at line 440 of file f5lists.cc.

440  {
441  first = new LNode(t,i,p,r);
442  last = first;
443  length = 1;
444 }
int i
Definition: cfEzgcd.cc:132
int p
Definition: cfModGcd.cc:4080

◆ ~LList()

LList::~LList ( )

Definition at line 446 of file f5lists.cc.

446  {
447  LNode* temp;
448  while(first) {
449  temp = first;
450  first = first->getNext();
451  delete temp;
452  //Print("%p\n",first);
453  }
454 }
LNode * getNext()
Definition: f5lists.cc:321

Member Function Documentation

◆ count()

int LList::count ( LNode l)

Definition at line 542 of file f5lists.cc.

542  {
543  return first->count(l);
544 }
int l
Definition: cfEzgcd.cc:100
int count(LNode *l)
Definition: f5lists.cc:408

◆ deleteByDeg()

void LList::deleteByDeg ( )

Definition at line 511 of file f5lists.cc.

511  {
512  first = first->deleteByDeg();
513 }
LNode * deleteByDeg()
Definition: f5lists.cc:316

◆ getFirst()

LNode * LList::getFirst ( )

Definition at line 519 of file f5lists.cc.

519  {
520  return first;
521 }

◆ getLast()

LNode * LList::getLast ( )

Definition at line 523 of file f5lists.cc.

523  {
524  return last;
525 }

◆ getLength()

int LList::getLength ( )

Definition at line 527 of file f5lists.cc.

527  {
528  return length;
529 }

◆ insert() [1/2]

void LList::insert ( LPolyOld lp)

Definition at line 457 of file f5lists.cc.

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

◆ insert() [2/2]

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

Definition at line 470 of file f5lists.cc.

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

◆ insertByDeg()

void LList::insertByDeg ( LPolyOld lp)

◆ insertByLabel() [1/2]

void LList::insertByLabel ( LNode l)

Definition at line 505 of file f5lists.cc.

505  {
507  length++;
508  //Print("LENGTH %d\n",length);
509 }
LNode * insertByLabel(poly t, int i, poly p, RuleOld *r)
Definition: f5lists.cc:221

◆ insertByLabel() [2/2]

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

Definition at line 493 of file f5lists.cc.

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

◆ insertFirst()

void LList::insertFirst ( LNode l)

Definition at line 499 of file f5lists.cc.

499  {
500  first = first->insertFirst(l);
501  length++;
502  //Print("LENGTH %d\n",length);
503 }
LNode * insertFirst(LNode *l)
Definition: f5lists.cc:265

◆ insertSP() [1/2]

void LList::insertSP ( LPolyOld lp)

Definition at line 480 of file f5lists.cc.

480  {
481  first = first->insertSP(lp);
482  length++;
483  //Print("LENGTH %d\n",length);
484 }
LNode * insertSP(LPolyOld *lp)
Definition: f5lists.cc:206

◆ insertSP() [2/2]

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

Definition at line 486 of file f5lists.cc.

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

◆ polyTest()

bool LList::polyTest ( poly *  p)

Definition at line 515 of file f5lists.cc.

515  {
516  return first->polyTest(p);
517 }
bool polyTest(poly *p)
Definition: f5lists.cc:377

◆ print()

void LList::print ( )

Definition at line 538 of file f5lists.cc.

538  {
539  first->print();
540 }
void print()
Definition: f5lists.cc:393

◆ setFirst()

void LList::setFirst ( LNode l)

Definition at line 531 of file f5lists.cc.

531  {
532  LNode* temp = first;
533  temp->setNext(NULL);
534  first = l;
535  length--;
536 }
void setNext(LNode *l)
Definition: f5lists.cc:368

Field Documentation

◆ first

LNode* LList::first
private

Definition at line 129 of file f5lists.h.

◆ last

LNode* LList::last
private

Definition at line 130 of file f5lists.h.

◆ length

int LList::length
private

Definition at line 131 of file f5lists.h.


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