Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Monad Research
Message
From
19/01/2009 15:47:19
 
 
To
19/01/2009 13:50:42
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01375100
Message ID:
01375241
Views:
7
>>So, a particle will exchange its velocity (dx, dy, dz) with every other particle. That means that when you finish one cycle of exchanges, a particle will retain the velocity of the last particle it happened to interact with. The order of the interaction can make quite a difference, then. I would say, the FOR EACH doesn't give you a very fine control over the order in which the particles interact. Perhaps you should use an array to have a better control over this order of exchanges.
>
>
>Hmmm.
>
>Shouldn't
>
>FOR EACH xxx IN myarray
>
>be exactly equal to
>
>FOR nnn = 1 to alen(myarray)
> xxxx = myarray[nnn]

One thing to consider would be randomizing the order in which you process the array/collection elements. Always processing them from the same end might introduce some sort of systematic effect.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform