1805 System . out . println ( **" one = "+**fOhps . state **( ) ) ;** 1806 f o r ( i=0;i<theSizeOfFrame ; i**++) {** 1807 System . out . println ( " atom [ "+i**+" ] = "** +atom [ i ] . state **( ) ) ;**
1808 }
1809 System . out . println ( " \n−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n " ) ; 1810 fOhps . zero **( ) .** complement **( ) ;**
1811 System . out . println ( **" complement ( z e r o ) = "+**fOhps . state **( ) ) ;**
1812 fOhps . one **( ) .** complement **( ) ;** 1813 System . out . println ( **" complement ( one ) = "+**fOhps . state **( ) ) ;**
1814 f o r ( i=0;i<theSizeOfFrame ; i**++) {**
1815 fOhps . complement ( atom [ i **] ) ;**
1816 System . out . println ( " complement ( atom [ "+i**+" ] ) = "** +fOhps . state **( ) ) ;**
1817 }
1818 System . out . println ( " \n−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n " ) ;
1819 fOhps . zero **( ) .** cocomplement **( ) ;** 1820 System . out . println ( **" cocomp lement ( z e r o ) = "+**fOhps . state **( ) ) ;**
1821 fOhps . one **( ) .** cocomplement **( ) ;**
1822 System . out . println ( **" cocomp lement ( one ) = "+**fOhps . state **( ) ) ;**
1823 f o r ( i=0;i<theSizeOfFrame ; i**++) {**
1824 fOhps . cocomplement ( atom [ i **] ) ;**
1825 System . out . println ( " cocomp lement ( atom [ "+i**+" ] ) = "** +fOhps . state **( ) ) ;**
1826 }
1827 System . out . println ( " \n−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−\n " ) ;
1828 1829 System . out . println ( **" \n\n ////// Test : (A OR B) AND (B OR C) = B OR (A AND C**←֓
) " ) ;
1830 finalOpenhyperpowers et A = atom [ theSizeOfFrame **/ 4 ] .** clone **( ) ;**
1831 finalOpenhyperpowers et B = atom [ theSizeOfFrame **/ 2 ] .** clone **( ) ;**
1832 finalOpenhyperpowers et C = atom **[ ( 3** ∗ theSizeOfFrame **) / 4 ] .** clone **( ) ;** 1833 finalOpenhyperpowers et AUB = fOhps . instanceNsize **( ) ;** 1834 finalOpenhyperpowers et BUC = fOhps . instanceNsize **( ) ;**
1835 finalOpenhyperpowers et ANC = fOhps . instanceNsize **( ) ;**
1836 finalOpenhyperpowers et left = fOhps . instanceNsize **( ) ;** 1837 finalOpenhyperpowers et right = fOhps . instanceNsize **( ) ;**
1838 AUB . or ( A , B ) ;
1839 BUC . or ( B , C ) ;
1840 ANC . and ( A , C ) ; 1841 left . and ( AUB , BUC ) ;
1842 right . or ( B , ANC ) ;
1843 **b o o l e an** isEqual=left . compareTo ( right **)==0;**
1844 System . out . println ( **"A = atom [ "+**theSizeOfFrame /4+ **" ] = "** + A . state **( ) ) ;** 1845 System . out . println ( **"B = atom [ "+**theSizeOfFrame /2+ **" ] = "** + B . state **( ) ) ;** 1846 System . out . println ( "C = atom [ " +(3∗ theSizeOfFrame ) /4+ **" ] = "** + C . state **( ) ) ;** 1847 System . out . println ( **" (A OR B) AND (B OR C) = "** + left . state **( ) ) ;** 1848 System . out . println ( **"B OR (A AND C ) = "** + right . state **( ) ) ;**
1849 System . out . println ( **" i s E q u a l = "+**isEqual ) ;
1850 1851 } 1852 1853 /∗∗ 1854 ∗ **Test some l o g i c a l m a n i p u l a t i o n s on C l o s e dh yp e rp ow e r s e t .**
1855 ∗ 1856 ∗ **<BR><BR>**
1857 ∗ **<b>D e t a i l e d cod e d e s c r i p t i o n .</b><BR>**
1858 ∗ **The f o l l o w i n g typonom ic c o n v e n t i o n s a r e used :<BR>** 1859 ∗ **<code>**
1860 ∗ <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 ">**
1861 ∗ **Blue c o l o r i s used f o r commenting th e f o l l o w i n g cod e .**
1862 ∗ **</f on t><BR>** 1863 ∗ **cod e f o rm a t i n g i s used f o r p r i n t i n g th e cod e .<BR>**
1864 ∗ <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 ">**
1865 ∗ Red c o l o r i s used f o r p r i n t i n g th e p o s s i b l e output r e s u l t i n g **o f th e** 1866 ∗ **p r e v i o u s cod e .**
1867 ∗ **</f on t>** 1868 ∗ **</code><BR><BR>**
1869 ∗ For th e output , i t i s assumed th a t <i>th eS i z eO fFram e=4</ i> **( param e t e r o f** ←֓
th e method ) .

1870 ∗ **<BR><BR>**
1871 ∗ **Commented cod e :** 1872 ∗ **<BR><BR>**
1873 ∗ **<code>** 1874 ∗ **i n t i ;<BR>**
1875 ∗ <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 ">** 1876 ∗ **D e c l a r a t i o n o f a c l o s e d h yp e rp ow e rs e t , <i>fChps</ i >;**