swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Concurrent Groups & Randomized Default Order for ActionGroups


From: Parviez HosseiniC
Subject: Re: Concurrent Groups & Randomized Default Order for ActionGroups
Date: Wed, 13 May 1998 10:18:37 -0700 (PDT)

Glen et al. --

Here is the patch file, by  which I presume you mean the output of a diff 
command.

-Parviez
diff -rwb original/actiongroup.h new/actiongroup.h
14a15
> #import <random.h>
20a22
>   id  ranNumGen;              // Random Number Generator for random ordered 
> groups.
33a36
> -(void)setDefaultOrderRandomizedWithGenerator:(id)Generator;

diff -rwb original/actiongroup.m new/actiongroup.m
25a26,32
> -(void)setDefaultOrderRandomizedWithGenerator:Generator

> {

>     setBit( bits, BitRandomized, 1 );

>     ranNumGen=Generator;

> }

> 

> 
283a291
> 
354a363
>   int temp;

357d365
< 
358a367
> 
363c372,380
<   // get next action to be executed
---
>   // Implementation of Randomized Order for Action Groups

>   // Only bother with Random if number of actions is greater than 1, and bit 
> is set.

>   temp=[ ((ActionGroup_c *)collection) getCount]; 

>   if( ((ActionGroup_c *)collection)->bits & BitRandomized  && temp>1){ 

>     temp=(int)((temp)* [((ActionGroup_c *)collection)->ranNumGen 
> getDoubleSample] ); 
>     // get next action to be executed, random method

>     nextAction = [self setOffset:temp]; 

> }

>   else { nextAction=[self next]; } // get next action to be executed, 
> non-random method

365d381
<   nextAction = [self next];
diff -rwb original/activity.h new/activity.h
103a104
> -(void)setDefaultOrderRandomizedWithGenerator:(id)Generator;

diff -rwb original/compoundaction.h new/compoundaction.h
24a25
>   id  ranNumGen;      // Random Number Generator for random ordered groups.

diff -rwb original/compoundaction.m new/compoundaction.m
42c42
<     setBit( bits, BitRandomized, 1 );
---
>     raiseEvent(NotImplemented,"Implemented as 
> setDefaultOrderRandomizedwithGenerator:(id)\n");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]