142 **i n t** i ; 143 f o r ( i=0;i<=size_mem_1 ; i++) _memory [ i]= leftmem [ i ] | rightmem [ i ] ; 144 r e t u r n ( L ) **t h i s** ;
145 } 146 147 /∗∗ 148 ∗ Answer <i>t ru e </ i> i f th e p r o p o s i t i o n s t o r e d w i t h i n <i>t h i **s </ i> i n t e r s e c t s th e**
149 ∗ p r o p o s i t i o n c o n t a i n e d w i t h i n <i>a P r o p o s i t i o n </ i> (< i>i . **e .</ i> th e i n t e r s e c t i o n**
150 ∗ **o f both p r o p o s i t i o n s i s not <i>z e r o </ i >) . Answer <i>f a l s e </ i> o t h e r w i s e .** 151 ∗
152 ∗/
153 @Override 154 **p u b l i c b o o l e an** intersects ( L aProposition ) {
155 l on g [ ] rightmem=aProposition . _memory ;
156 **i n t** i ; 157 f o r ( i=0;i<=size_mem_1 ; i**++) {**
158 i f ( ( _memory [ i ]& rightmem [ i ] ) !=0) **r e t u r n t r u e** ;
159 }
160 **r e t u r n f a l s e** ;
161 } 162 163 /∗∗
164 ∗ Answer <i>t ru e </ i> i f th e p r o p o s i t i o n s t o r e d w i t h i n <i>t h i **s </ i> c o n t a i n s th e**
165 ∗ **p r o p o s i t i o n c o n t a i n e d w i t h i n <i>a P r o p o s i t i o n </ i >. Answer <i>f a l s e </ i> o t h e r w i s e** ←֓
.

166 ∗
167 ∗/
168 @Override 169 **p u b l i c b o o l e an** contains ( L aProposition ) { 170 l on g [ ] rightmem=aProposition . _memory ; 171 **i n t** i ;
172 f o r ( i=0;i<=size_mem_1 ; i**++) {**
173 i f ( ( _memory [ i ]& rightmem [ i **] ) !=** rightmem [ i ] ) **r e t u r n f a l s e** ;
174 } 175 **r e t u r n t r u e** ;
176 }
177 178 /∗∗ 179 ∗ **Compare <i>t h i s </ i> t o <i>a P r o p o s i t i o n </ i> and answe r n e ga t i v e i n t e g e r , z e r o ,**
180 ∗ p o s i t i v e i n t e g e r a s <i>t h i s </ i> i s l e s s than , e q u a l to , o r g r **e a t e r than**
181 ∗ **<i>a P r o p o s i t i o n </ i >.**
182 ∗ Th is compar ison i s r e l a t e d t o a t o t a l o r d e r i n g o f th e p r o p o s i **t i o n ; <em> i t i s** ←֓
not 183 ∗ r e l a t e d t o th e p a r t i a l o r d e r im p l i e d by th e l o g i c a l o p e r a t o r **s AND and OR.</em>**
184 ∗ 185 ∗/
186 @Override 187 **p u b l i c i n t** compareTo ( L aProposition ) {
188 l on g [ ] rightmem=aProposition . _memory ;
189 **i n t** i ;
190 **l on g** delta ; 191 f o r ( i=0;i<=size_mem_1 ; i**++) {**
192 delta=_memory [ i]− rightmem [ i ] ;
193 i f ( delta >0) r e t u r n 1 ; 194 i f ( delta <0) **r e t u r n** −1; 195 }
196 r e t u r n 0 ;
197 }
198 199 /∗∗
200 ∗ **R e s i z e <i>t h i s </ i> a t th e same s i z e than <i>input </ i >.**
201 ∗ 202 ∗/
203 @Override 204 **p u b l i c** L size ( L input ) {
205 size_mem_1=input . size_mem_1 ;
206 highest_long_one=input . highest_long_one ;
207 _memory**=new l on g** [ size_mem_1 **+ 1 ] ;** 208 r e t u r n ( L ) **t h i s** ;
209 }
210 211 212 /∗∗ 213 ∗ **Do an e x a c t copy o f inpu t i n t o <i>t h i s </ i >.**