};
static unsigned int __selecttbl[8*256];
+static int built = 0;
void make___selecttbl(void) {
+ if(built) return;
+ built = 1;
int i,x,r;
uint buf[1];
return 0;
}
+//selects3 * lasts3=NULL;
+//int lasti=0;
+//int lasts=0;
int selects3_select(selects3 *select, int i) {
int d,x;
if (i == 0) return -1;
d = select->d;
-
- x = selectd2_select(select->sd1,i,1) - (i-1);
+ /*if(select->lasti==(uint)i-1) {
+ while(!__getbit2(select->sd1->buf,++select->lasts));
+ }
+ else {
+ select->lasts = selectd2_select(select->sd1,i,1);
+ }
+ select->lasti = i;
+ //lasts3 = select; */
+ x = selectd2_select(select->sd1,i,1) - (i-1);
+ //x = (select->lasts-(i-1)) << d;
x <<= d;
x += __getbits(select->low,(i-1)*d,d);
return x;
-
}
int selects3_selectnext(selects3 *select, int i) {
+ //return selects3_select(select,selects3_rank(select,i)+1);
int d,x,w,y;
int r,j;
int z,ii;
q = select->low;
ii = i>>d;
+
y = selectd2_select(select->sd0,ii,0)+1;
// selectd2_select2(select->sd0,ii,0,&y1,&y2);
//y1++; y2++;