src/puzzle.cpp
/* partial process for Rating_baseNest
   done either using d_nested2 or d_nested
   if d_nested gives results, take it
*/
partial process for Rating_baseNest
done either using d_nested2 or d_nested
if d_nested gives results, take it
partial process for Rating_baseNest done either using d_nested2 or d_nested if d_nested gives results take it
void PUZZLE::Rbn_Elims( BFTAG * tsquare,int nn){
	rbn_d_nested=tsquare;
	rbn_elims1.SetAll_0();
	rbn_elims2=rbn_elims3=rbn_elims1;
	rbn_it2=0;
	for(int i = 2; i < col; i += 2) {
		BFTAG tw (tsquare[i]); 
		BFTAG tw1 (tw);
		tw1 &= tw.Inverse();
		BFTAG tw2 ( tw);
		tw2 &= tsquare[i ^ 1];
		tw2 = tw2.FalseState();
		tw1 = tw1.TrueState();
		if(tw2.IsNotEmpty()) {  
			rbn_elimst2[rbn_it2] = tw2;
			rbn_t2[rbn_it2++] = i;
			rbn_elims2 |= tw2;
		}
		if(tw1.IsNotEmpty()) {  
			rbn_elims1.Set(i);
		}
	}
	rbn_itch = 0;
	for(int ie = 1; ie < zcx.izc; ie++) {
		SET chx = zcx.zc[ie];
		int nni = chx.ncd; 
		if(chx.type - SET_base)
			continue;
		BFTAG bfw(BFTAG::InitFalseState);
		for(int i = 0; i < nni; i++){
			if(0)  
				Image(tsquare[chx.tcd[i] << 1],"dpn",chx.tcd[i] << 1);
			bfw &= tsquare[chx.tcd[i] << 1];
		    if(0) { 
 				chx.Image(this,&EE);
				Image(bfw,"communs",0);
			}
		}
		if(bfw.IsNotEmpty()) {
			if(0 && options.ot && rbase > 100) {
                chx.Image(this,&EE); 
			    Image(bfw," actif for ",0);
			}
			rbn_tchte[rbn_itch] = bfw;
			rbn_tch[rbn_itch++] = ie;
			rbn_elims3 |= bfw;
		}
	}
	rbn_elimt = rbn_elims1.Inverse();
	rbn_elimt |= rbn_elims2;
	rbn_elimt |= rbn_elims3;
	if(options.ot && rbn_elimt.IsNotEmpty() ){ 
		EE.E("summary of first phase call nn= ");EE.Enl( nn);
		EE.E("itch ="); EE.E(rbn_itch);
		EE.E(" it2 ="); EE.Enl(rbn_it2);
		Image(rbn_elims1.Inverse(),"elims1 potential", 0);
		Image(rbn_elims2,"elims2 potential", 0);
		Image(rbn_elims3,"elims3 potential", 0);
	}
}
void PUZZLE :: Rbn_Elims ( BFTAG * tsquare , int nn ) { rbn_d_nested = tsquare ; rbn_elims1 . SetAll_0 ( ) ; rbn_elims2 = rbn_elims3 = rbn_elims1 ; rbn_it2 = 0 ; for ( int i = 2 ; i < col ; i += 2 ) { BFTAG tw ( tsquare [ i ] ) ; BFTAG tw1 ( tw ) ; tw1 &= tw . Inverse ( ) ; BFTAG tw2 ( tw ) ; tw2 &= tsquare [ i ^ 1 ] ; tw2 = tw2 . FalseState ( ) ; tw1 = tw1 . TrueState ( ) ; if ( tw2 . IsNotEmpty ( ) ) { rbn_elimst2 [ rbn_it2 ] = tw2 ; rbn_t2 [ rbn_it2 ++ ] = i ; rbn_elims2 |= tw2 ; } if ( tw1 . IsNotEmpty ( ) ) { rbn_elims1 . Set ( i ) ; } } rbn_itch = 0 ; for ( int ie = 1 ; ie < zcx . izc ; ie ++ ) { SET chx = zcx . zc [ ie ] ; int nni = chx . ncd ; if ( chx . type - SET_base ) continue ; BFTAG bfw ( BFTAG :: InitFalseState ) ; for ( int i = 0 ; i < nni ; i ++ ) { if ( 0 ) Image ( tsquare [ chx . tcd [ i ] << 1 ] , " " , chx . tcd [ i ] << 1 ) ; bfw &= tsquare [ chx . tcd [ i ] << 1 ] ; if ( 0 ) { chx . Image ( this , & EE ) ; Image ( bfw , " " , 0 ) ; } } if ( bfw . IsNotEmpty ( ) ) { if ( 0 && options . ot && rbase > 100 ) { chx . Image ( this , & EE ) ; Image ( bfw , " " , 0 ) ; } rbn_tchte [ rbn_itch ] = bfw ; rbn_tch [ rbn_itch ++ ] = ie ; rbn_elims3 |= bfw ; } } rbn_elimt = rbn_elims1 . Inverse ( ) ; rbn_elimt |= rbn_elims2 ; rbn_elimt |= rbn_elims3 ; if ( options . ot && rbn_elimt . IsNotEmpty ( ) ) { EE . E ( " " ) ; EE . Enl ( nn ) ; EE . E ( " " ) ; EE . E ( rbn_itch ) ; EE . E ( " " ) ; EE . Enl ( rbn_it2 ) ; Image ( rbn_elims1 . Inverse ( ) , " " , 0 ) ; Image ( rbn_elims2 , " " , 0 ) ; Image ( rbn_elims3 , " " , 0 ) ; } }
partial process for Rating_baseNest
done either using d_nested2 or d_nested
if d_nested gives results, take it
partial process for Rating_baseNest done either using d_nested2 or d_nested if d_nested gives results take it
// cases 1 and 2,{ a=>x a=> ~x } { x => ~a and ~x=> ~a} // case 2 includes the so called cell or region eliminations for bi values // full expansion for the tag // case 2 // case 1 // case 3, is there a set killing "a" // end case 3 //Image(rbn_elimt,"elimt potential", 0);