
2564 f o r ( n=0;n<NbSamples ; n++) Samples . add ( aSampler . makeFusedSample **( ) ) ;** 2565 Z=aSampler . learnFrom ( Samples . toArray **( ) ) ;** 2566 System . out . println ( " aSamp ler − **PCR6** −− " + NbSamples + " p a r t i c l e s " ) ; 2567 System . out . println ( " C o n f l i c t Z = "+Z+" %" ) ; 2568 System . out . println ( aSampler . state ( printMode **) ) ;** 2569 System . out . println **( ) ;**

2570 //

2571 aSampler . setFuser ( bbaArrayS , referee5 ) ; 2572 Samples . clear **( ) ;**

2573 f o r ( n=0;n<NbSamples ; n++) Samples . add ( aSampler . makeFusedSample **( ) ) ;**

2574 Z=aSampler . learnFrom ( Samples . toArray **( ) ) ;**

2575 System . out . println ( " aSamp ler − **PCR#** −− " + NbSamples + " p a r t i c l e s " ) ; 2576 System . out . println ( " C o n f l i c t Z = "+Z+" %" ) ;

2577 System . out . println ( aSampler . state ( printMode **) ) ;**

2578 System . out . println **( ) ;**

2579

2580 } 2581

2582

2583 /∗∗ 2584 ∗ **D emonstrat e th e c r e a t i o n o f a new R e f e r e e Fun c t ion .**

2585 ∗ **<BR><BR>**

2586 ∗ In t h i s examp le , a new r e f e r e e f u n c t i o n i s c r e a t e d from th e r e **f e r e e** ←֓

f u n c t i o n

2587 ∗ f o r Dempster−S h a f e r by e x c l u d i n g a p r o p o s i t i o n <i>e x c l u d e d P r o p o s i t i o n **</ i >.**

2588 ∗ **More p r e c i s e l y :<BR>**

2589 ∗ &nbsp ; &nbsp ; − **I f <i>e x c l u d e d P r o p o s i t i o n=n u l l </ i >, j u s t do a s f o r Dempster**←֓

−**Sh a f e r ,**

2590 ∗ **<BR>**

2591 ∗ &nbsp ; &nbsp ; − **O th e rw i s e :<BR>**

2592 ∗ &nbsp ; &nbsp ; &nbsp ; &nbsp ; − **L e t <i >(X , 1 . )</ i> be th e r e f e r e e output f o r**←֓

Dempster−**Sh a f e r ,<BR>**

2593 ∗ &nbsp ; &nbsp ; &nbsp ; &nbsp ; − **I f <i>e x c l u d e d P r o p o s i t i o n CONTAINS X </ i >,** ←֓

th en r e t u r n <i >( z e r o , 1 . )</ i >,

2594 ∗ **th a t i s a f u l l r e j e c t i o n ,<BR>**

2595 ∗ &nbsp ; &nbsp ; &nbsp ; &nbsp ; − **Oth e rw ise , r e t u r n <i >(X AND cocomp lement (**←֓

e x c l u d e d P r o p o s i t i o n )

2596 ∗ , 1 . )</ i >, th a t i s <i>X</ i> t r u n c a t e d by <i>e x c l u d e d P r o p o s **i t i o n </ i >.** 2597 ∗ **<BR><BR>**

2598 ∗ **Except f o r th e r e f e r e e f u n c t i o n c r e a t i o n , t h i s examp le works l i k e**

2599 ∗ **{@ l ink R e f e r e eTo o lb ox_Tu t o r i a l#Re fereeFuserRTS_Compar ison ( ) } , s o th a t th e** 2600 ∗ **sub s e qu e n t e x p l a i n e d cod e on l y c on c e rn th e R e f e r e e Fun c t ion c r e a t i o n .**

2601 ∗

2602 ∗ **<BR><BR>**

2603 ∗ **<b>D e t a i l e d cod e d e s c r i p t i o n .</b><BR>** 2604 ∗ **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>**

2605 ∗ **<code>**

2606 ∗ <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 ">** 2607 ∗ **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 .**

2608 ∗ **</f on t><BR>** 2609 ∗ **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>**

2610 ∗ **</code>** 2611 ∗ **<BR>**

2612 ∗ **Commented cod e :**

2613 ∗ **<BR><BR>** 2614 ∗ **<code>**

2615 ∗ <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 ">**

2616 ∗ **C r e a t i on o f a c l a s s <i>myRe f e r e eFun c t ion</ i> e x t e n d i n g the c l a s s**

2617 ∗ {@ l ink R e f e r e e Fun c t ionD emps t e r } ( a r e f e r e e f u n c t i o n f o r Dempster−**S h a f e r ) .**

2618 ∗ **Th is d e f i n i t i o n i s g e n e r i c , d ep end ing on a c l a s s <i>Prop</ i> wh ich i s a** ←֓

comp lemented l a t t i c e ,

2619 ∗ **th a t i s {@code Prop e x t e nd s Comp l em entedLatt ic e<Prop> } ;** 2620 ∗ **</f on t><BR>**

2621 ∗ **c l a s s {@code myRe f e r e eFun c t ion<Prop e x t e nd s Comp l em ent edLatt i ce<Prop> > }<**←֓

BR>

2622 ∗ **&nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ; &nbsp ;** 2623 ∗ **{@code e x t e nd s Re f e r e eFun c t ionD empst e r <Prop> }{<BR>**

2624 ∗ <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 ">**

2625 ∗ D e c l a r a t i o n o f th e e x c lud e d p r o p o s i t i o n <i>e x c l u d e d P r o p o **s i t i o n </ i >. By** 2626 ∗ **d e f a u l t , i t i s u n d e f i n e d ;**

2627 ∗ **</f on t><BR>** 2628 ∗ **&nbsp ; &nbsp ; p u b l i c Prop e x c l u d e d P r o p o s i t i o n = n u l l ;<BR>**

2629 ∗ <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 ">**

2630 ∗ **R e d e f i n i t i o n ( o v e r r i d i n g ) o f method {@code A r r ay L i s t<Assignment<Prop>>** ←֓
