source: liacs/da/fibo_queue/storelist.cc@ 94

Last change on this file since 94 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

File size: 1.4 KB
Line 
1#include "storelist.h"
2scl1::scl1(FiboNode*sv46){sv47=sv46;sv83=NULL;}scl2::scl2(int sv44,int sv45)
3{int w;Min=sv44;sv10=sv45;A=new sdf1[sv10-Min+1];for(w=0;w<=sv10-Min;w++)
4A[w]=NULL;}scl2::~scl2(){int w;sdf1 sv48,sv49;for(w=0;w<=sv10-Min;w++)
5{sv48=A[w];while(sv48!=NULL){sv49=sv48;sv48=sv48->sf20();delete sv49;}}
6delete[]A;}void scl2::Merge(scl2*sv50){int w;sdf1 sv49,sv48;
7for(w=0;w<=sv10-Min;w++)if(sv50->A[w]!=NULL){if(A[w]==NULL)A[w]=sv50->A[w];else
8{sv49=NULL;sv48=A[w];do{sv49=sv48;sv48=sv48->sf20();}while(sv48!=NULL);
9sv49->sf20(sv50->A[w]);}sv50->A[w]=NULL;}}bool scl2::sf16(QValueTp sv5){
10if((sv5>=Min)&&(sv5<=sv10))return true;else return false;}
11void scl2::sf24(QValueTp sv5,FiboNode*sv12){int w;sdf1 sv51;if(sf16(sv5))
12{sv51=new scl1(sv12);w=sv5-Min;sv51->sf20(A[w]);A[w]=sv51;}}
13bool scl2::sf17(QValueTp sv5){int w;if(sf16(sv5)){w=sv5-Min;return(A[w]!=NULL);}
14else return false;}FiboNode*scl2::sf18(QValueTp sv5){int w;sdf1 sv52;
15FiboNode*sv12;if(sf16(sv5)){w=sv5-Min;sv52=A[w];if(sv52!=NULL)
16{A[w]=sv52->sf20();sv12=sv52->sf19();delete sv52;return sv12;}else return NULL;}
17else return NULL;}void scl2::sf18(QValueTp sv5,FiboNode*sv12){int w;
18sdf1 sv48,sv49;bool sv53,sv56;if(sf16(sv5)){w=sv5-Min;sv48=A[w];sv49=NULL;
19sv53=false;sv56=true;while(sv56)if(sv48==NULL)sv56=false;else
20if(sv48->sf19()==sv12){sv53=true;sv56=false;}else{sv49=sv48;sv48=sv48->sf20();}
21if(sv53){if(sv49==NULL)A[w]=sv48->sf20();else sv49->sf20(sv48->sf20());
22delete sv48;}}}
Note: See TracBrowser for help on using the repository browser.