My Project  UNKNOWN_GIT_VERSION
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 1110 of file f5lists.cc.

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

◆ RTagNode() [2/3]

RTagNode::RTagNode ( RNode r)

Definition at line 1115 of file f5lists.cc.

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

◆ RTagNode() [3/3]

RTagNode::RTagNode ( RNode r,
RTagNode n 
)

Definition at line 1120 of file f5lists.cc.

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

◆ ~RTagNode()

RTagNode::~RTagNode ( )

Definition at line 1126 of file f5lists.cc.

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

Member Function Documentation

◆ get()

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

Definition at line 1151 of file f5lists.cc.

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

◆ getNext()

RTagNode * RTagNode::getNext ( )

Definition at line 1144 of file f5lists.cc.

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

◆ getRNode()

RNode * RTagNode::getRNode ( )

Definition at line 1138 of file f5lists.cc.

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

◆ insert()

RTagNode * RTagNode::insert ( RNode r)

Definition at line 1131 of file f5lists.cc.

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

◆ print()

void RTagNode::print ( )

Definition at line 1175 of file f5lists.cc.

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

◆ set()

void RTagNode::set ( RNode r)

Definition at line 1170 of file f5lists.cc.

1170  {
1171  this->data = r;
1172 }
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: