1 | #include "storelist.h"
|
---|
2 | scl1::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++)
|
---|
4 | A[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;}}
|
---|
6 | delete[]A;}void scl2::Merge(scl2*sv50){int w;sdf1 sv49,sv48;
|
---|
7 | for(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);
|
---|
9 | sv49->sf20(sv50->A[w]);}sv50->A[w]=NULL;}}bool scl2::sf16(QValueTp sv5){
|
---|
10 | if((sv5>=Min)&&(sv5<=sv10))return true;else return false;}
|
---|
11 | void 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;}}
|
---|
13 | bool scl2::sf17(QValueTp sv5){int w;if(sf16(sv5)){w=sv5-Min;return(A[w]!=NULL);}
|
---|
14 | else return false;}FiboNode*scl2::sf18(QValueTp sv5){int w;sdf1 sv52;
|
---|
15 | FiboNode*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;}
|
---|
17 | else return NULL;}void scl2::sf18(QValueTp sv5,FiboNode*sv12){int w;
|
---|
18 | sdf1 sv48,sv49;bool sv53,sv56;if(sf16(sv5)){w=sv5-Min;sv48=A[w];sv49=NULL;
|
---|
19 | sv53=false;sv56=true;while(sv56)if(sv48==NULL)sv56=false;else
|
---|
20 | if(sv48->sf19()==sv12){sv53=true;sv56=false;}else{sv49=sv48;sv48=sv48->sf20();}
|
---|
21 | if(sv53){if(sv49==NULL)A[w]=sv48->sf20();else sv49->sf20(sv48->sf20());
|
---|
22 | delete sv48;}}}
|
---|