
212 System . err . println ( " E r r o r : : a s s i g n I n i s n u l l " ) ;

![0_image_0.png](0_image_0.png) 213 System . exit **( 0 ) ;**

214 }

215 **i n t** i ; 216 i=assignIn . size **( ) ;** 217 i f ( i**<1) {**

218 System . err . println ( **" E r r o r : : "+t h i s** . getClass **( ) .** getName **( ) +**

219 " . r e f e r e e F u n c t i o n ( A r r ay L i s t<Ass ignment<Prop>>,A r r ayL i s t<B>)" ) ;

220 System . err . println ( " E r r o r : : a s s i g n I n i s empty " ) ;

221 System . exit **( 0 ) ;**

222 }

223 i f ( theEntrySize !=i ) { 224 theEntrySize=i ;

225 weightTab = **new d oub l e** [ theEntrySize **+ 1 ] ;**

226 mapTab= **new i n t** [ theEntrySize **+ 1 ] ;** 227 thePropositionTab = new ArrayList <Prop **>() ;**

228 f o r ( i=0;i<=theEntrySize ; i**++) {**

229 thePropositionTab . add ( n u l l ) ;

230 }

231 }

232 i f ( theZero==n u l l ) {

233 theZero=assignIn . get **( 0 ) .** attribute . instanceNsize **( ) .** zero **( ) ;** 234 theOne=theZero . instanceNsize **( ) .** one **( ) ;**

235 }

236 i f ( theDefault**==n u l l** ) theDefault=theZero ;

237 ArrayList <Assignment <Prop>> arbitrament**=n u l l** ; 238 **f o r** ( i=theEntrySize ; i >0;i−−) {

239 arbitrament=askWeightedSubset ( i , assignIn ) ;

240 i f ( arbitrament . size ( ) >0) **r e t u r n** arbitrament ;

241 }

242 Assignment <Prop> finalAssignment = new Assignment <Prop **>() ;**

243 finalAssignment . attribute=theDefault . clone **( ) ;**

244 finalAssignment . value **= 1 . ;**

245 **// NB: i n i t i a l i z a t i o n o f a r b i t r am e n t i s done i n th e l o op**

246 arbitrament . add ( finalAssignment ) ;

247 **r e t u r n** arbitrament ;

248 }

249 250 }
