2011 ∗ **</f on t>**
2012 ∗ **ANC. and (A , C) ;<BR>** 2013 ∗ **l e f t . and (AUB,BUC) ;<BR>**
2014 ∗ **r i g h t . o r (B ,ANC) ;<BR>** 2015 ∗ <f o n t c o l o r ="\#0000FF" s t y l e =" f on t−**f am i l y : g e o r g i a ">**
2016 ∗ **Test i f <i>l e f t </ i> and <i>r i g h t </ i> a r e e qu a l , and s t o r e the r e s u l t w i t h i n** 2017 ∗ **<i>i sE qu a l </ i >;<BR>**
2018 ∗ **</f on t>**
2019 ∗ **b o o l e an i s E q u a l= l e f t . compareTo ( r i g h t )==0;<BR>** 2020 ∗ <f o n t c o l o r ="\#0000FF" s t y l e =" f on t−**f am i l y : g e o r g i a ">**
2021 ∗ **P r i n t p r o p o s i t i o n s <i>A , B ,C , l e f t , r i g h t </ i> and th e b o o l ean <i>i sE qu a l </ i >;<**←֓
BR>
2022 ∗ **</f on t>** 2023 ∗ System . out . p r i n t l n ( "A = atomC["+ th eS i z eO fFram e /4+" ] = " **+ A . s t a t e ( ) ) ;<BR>**
2024 ∗ System . out . p r i n t l n ( "B = atomC["+ th eS i z eO fFram e /2+" ] = " **+ B . s t a t e ( ) ) ;<BR>**
2025 ∗ System . out . p r i n t l n ( "C = atomC [ "+ ( 3∗ **th eS i z eO fFram e ) /4+" ] = " + C . s t a t e ( ) ) ;<**←֓
BR>
2026 ∗ System . out . p r i n t l n ( " (A OR B) AND (B OR C) = " + l e f t . s t a t e ( ) ) **;<BR>**
2027 ∗ **System . out . p r i n t l n ( "B OR (A AND C ) = " + r i g h t . s t a t e ( ) ) ;<BR>**
2028 ∗ **System . out . p r i n t l n ( " i s E q u a l = "+ i s E q u a l ) ;<BR>** 2029 ∗ <f o n t c o l o r="\#FF0000 " s t y l e =" f on t−**f am i l y : g e o r g i a ">**
2030 ∗ **A = atomC [ 1 ] = x 0 0 0 0 0 0 0 0 0 0 0 0 c c c c<BR>**
2031 ∗ **B = atomC [ 2 ] = x 0 0 0 0 0 0 0 0 0 0 0 0 f 0 f 0 <BR>** 2032 ∗ **C = atomC [ 3 ] = x 0 0 0 0 0 0 0 0 0 0 0 0 f f 0 0 <BR>** 2033 ∗ **(A OR B) AND (B OR C) = x 0 0 0 0 0 0 0 0 0 0 0 0 f c f 0 <BR>**
2034 ∗ **B OR (A AND C ) = x 0 0 0 0 0 0 0 0 0 0 0 0 f c f 0 <BR>**
2035 ∗ **i s E q u a l = t ru e<BR>** 2036 ∗ **</f on t>**
2037 ∗ **</code>**
2038 ∗
2039 ∗/
2040 **p u b l i c v o id** l o g i c a l _ t e s ts _C los ed hy pe rp owe rs et ( **i n t** theSizeOfFrame ) {
2041 2042 **i n t** i ;
2043 finalClosedhyperpow er set fChps = new finalClosedhyperpo we rse t **( ) ;**
2044 i f ( fChps . size ( theSizeOfFrame **) !=** theSizeOfFrame ) {
2045 System . err . println ( **" E r r o r : : R e f e r e eTo o lb ox_Tu t o r i a l .**←֓
l o g i c a l _ t e s t s_ C l o s e d h y p e r p o w e r s e t ( i n t ) \n " +
2046 " Exceed a u t h o r i z e d bounds ! " ) ;
2047 System . exit **( 0 ) ;**
2048 }
2049 System . out . println ( " \n\n ////// Test : C l o s e dh yp e rp ow e r s e t − **s i z e = "** + ←֓
theSizeOfFrame +
2050 " //\n\n " ) ;
2051 finalClosedhyperpow er set [ ] atomC = new finalClosedhyperpow ers et [←֓
theSizeOfFrame ] ;
2052 f o r ( i=0;i<theSizeOfFrame ; i**++) {**
2053 atomC [ i ]= fChps . instanceNsize **( ) ;**
2054 atomC [ i ] . atomic ( i ) ;
2055 }
2056 fChps . zero **( ) ;** 2057 System . out . println ( **" z e r o = "+**fChps . state **( ) ) ;**
2058 fChps . one **( ) ;**
2059 System . out . println ( **" one = "+**fChps . state **( ) ) ;** 2060 f o r ( i=0;i<theSizeOfFrame ; i**++) {** 2061 System . out . println ( " atomC [ "+i**+" ] = "** +atomC [ i ] . state **( ) ) ;**
2062 }
2063 System . out . println ( " \n−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n " ) ; 2064 fChps . zero **( ) .** complement **( ) ;**
2065 System . out . println ( **" complement ( z e r o ) = "+**fChps . state **( ) ) ;**
2066 fChps . one **( ) .** complement **( ) ;** 2067 System . out . println ( **" complement ( one ) = "+**fChps . state **( ) ) ;** 2068 f o r ( i=0;i<theSizeOfFrame ; i**++) {** 2069 fChps . complement ( atomC [ i **] ) ;** 2070 System . out . println ( " complement ( atomC [ "+i**+" ] ) = "** +fChps . state **( ) ) ;**
2071 }
2072 System . out . println ( " \n−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n " ) ;
2073 fChps . zero **( ) .** cocomplement **( ) ;** 2074 System . out . println ( **" cocomp lement ( z e r o ) = "+**fChps . state **( ) ) ;** 2075 fChps . one **( ) .** cocomplement **( ) ;** 2076 System . out . println ( **" cocomp lement ( one ) = "+**fChps . state **( ) ) ;** 2077 f o r ( i=0;i<theSizeOfFrame ; i**++) {** 2078 fChps . cocomplement ( atomC [ i **] ) ;**
2079 System . out . println ( " cocomp lement ( atomC [ "+i**+" ] ) = "** +fChps . state **( ) ) ;**