Public Member Functions | Private Attributes
RTagNode Class Reference

#include <f5lists.h>

Public Member Functions

 RTagNode ()
 
 RTagNode (RNode *r)
 
 RTagNode (RNode *r, RTagNode *n)
 
 ~RTagNode ()
 
RTagNodeinsert (RNode *r)
 
RNodegetRNode ()
 
RTagNodegetNext ()
 
RNodeget (int idx, int length)
 
void set (RNode *)
 
void print ()
 

Private Attributes

RNodedata
 
RTagNodenext
 

Detailed Description

Definition at line 337 of file f5lists.h.

Constructor & Destructor Documentation

◆ RTagNode() [1/3]

RTagNode::RTagNode ( )

Definition at line 1109 of file f5lists.cc.

1109  {
1110  data = NULL;
1111  next = NULL;
1112 }
RTagNode * next
Definition: f5lists.h:340
#define NULL
Definition: omList.c:12
RNode * data
Definition: f5lists.h:339

◆ RTagNode() [2/3]

RTagNode::RTagNode ( RNode r)

Definition at line 1114 of file f5lists.cc.

1114  {
1115  data = r;
1116  next = NULL;
1117 }
RTagNode * next
Definition: f5lists.h:340
#define NULL
Definition: omList.c:12
RNode * data
Definition: f5lists.h:339

◆ RTagNode() [3/3]

RTagNode::RTagNode ( RNode r,
RTagNode n 
)

Definition at line 1119 of file f5lists.cc.

1119  {
1120 
1121  data = r;
1122  next = n;
1123 }
RTagNode * next
Definition: f5lists.h:340
RNode * data
Definition: f5lists.h:339

◆ ~RTagNode()

RTagNode::~RTagNode ( )

Definition at line 1125 of file f5lists.cc.

1125  {
1126  delete data;
1127 }
RNode * data
Definition: f5lists.h:339

Member Function Documentation

◆ get()

RNode * RTagNode::get ( int  idx,
int  length 
)

Definition at line 1150 of file f5lists.cc.

1150  {
1151  if(idx==1 || idx==0) {
1152  // NOTE: We set this NULL as putting it the last element in the list, i.e. the element having
1153  // RNode* = NULL would cost lots of iterations at each step of F5inc, with increasing
1154  // length of the list this should be prevented
1155  return NULL;
1156  }
1157  else {
1158  int j;
1159  RTagNode* temp = this;
1160  //Print("\n\nHIER IN GET IDX\n");
1161  //Print("FOR LOOP: %d\n",length-idx+1);
1162  for(j=1; j<=length-idx+1; j++) {
1163  temp = temp->next;
1164  }
1165  return temp->data;
1166  }
1167 }
int j
Definition: facHensel.cc:105
RTagNode * next
Definition: f5lists.h:340
#define NULL
Definition: omList.c:12
RNode * data
Definition: f5lists.h:339
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:263

◆ getNext()

RTagNode * RTagNode::getNext ( )

Definition at line 1143 of file f5lists.cc.

1143  {
1144  return next;
1145 }
RTagNode * next
Definition: f5lists.h:340

◆ getRNode()

RNode * RTagNode::getRNode ( )

Definition at line 1137 of file f5lists.cc.

1137  {
1138  //Print("%p\n", this);
1139  //Print("%p\n",this->data);
1140  return this->data;
1141 }
RNode * data
Definition: f5lists.h:339

◆ insert()

RTagNode * RTagNode::insert ( RNode r)

Definition at line 1130 of file f5lists.cc.

1130  {
1131  //Print("Hier1\n");
1132  RTagNode* newElement = new RTagNode(r, this);
1133  //Print("Hier2\n");
1134  return newElement;
1135 }
RTagNode()
Definition: f5lists.cc:1109

◆ print()

void RTagNode::print ( )

Definition at line 1174 of file f5lists.cc.

1174  {
1175  RTagNode* temp = this;
1176  if(NULL != temp && NULL != temp->getRNode()) {
1177  Print("1. element: %d, ",getRNode()->getRuleOld()->getIndex());
1178  pWrite(getRNode()->getRuleOld()->getTerm());
1179  temp = temp->next;
1180  int i = 2;
1181  while(NULL != temp->getRNode() && NULL != temp) {
1182  Print("%d. element: %d, ",i,getRNode()->getRuleOld()->getIndex());
1183  pWrite(getRNode()->getRuleOld()->getTerm());
1184  temp = temp->next;
1185  i++;
1186  }
1187  }
1188 }
#define Print
Definition: emacs.cc:80
static poly getTerm(const ideal H, const mark ab)
void pWrite(poly p)
Definition: polys.h:303
RTagNode * next
Definition: f5lists.h:340
int i
Definition: cfEzgcd.cc:125
#define NULL
Definition: omList.c:12
RNode * getRNode()
Definition: f5lists.cc:1137

◆ set()

void RTagNode::set ( RNode r)

Definition at line 1169 of file f5lists.cc.

1169  {
1170  this->data = r;
1171 }
RNode * data
Definition: f5lists.h:339

Field Documentation

◆ data

RNode* RTagNode::data
private

Definition at line 339 of file f5lists.h.

◆ next

RTagNode* RTagNode::next
private

Definition at line 340 of file f5lists.h.


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