void InitFirst(firstnode* F,string file) //First集初始化,书上开始用于检查 { //是否可达空字符的过程 sets* a=CreateSets(file); int tag=1; while(tag) { tag=0; sets* b=a->next; while(b) { if(judgeEnd(b->head,a)) { addFrist(b->head,'$',F); dcreaseEnd(a,b->head); tag=1; } b=b->next; } } /*sets* y=a->next; //查看内容可打开 charset* ch=NULL; printf("\nNot End In Init:%c\n"); while(y) { printf("\nNot End:%c\n",y->head); ch=y->cs; while(ch) { printf("%c,",ch->c); ch=ch->next; } y=y->next; }*/ /*firstnode* t=F->next; charset* te=NULL; while(t) { printf("\nNot End Point: %c\n",t->cur); te=t->cs->next; while(te) { printf("%c,",te->c); te=te->next; } t=t->next; }*/ }
void topSort::getMap() { int ent=0; memset(map,0,sizeof(map)); for(int i=0;i<=PicNum;i++) for(int j=0;j<=PicNum;j++) { if(i==j)continue; if(judgeStart(pics[j])) continue; if(judgeEnd(pics[i])) continue; if(compare(pics[i],pics[j],150)) { map[i][j]=1; qDebug()<<i<<" "<<j; ent++; } } qDebug()<<ent; }