swarm-support
[Top][All Lists]
Advanced

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

Using permutations


From: Gadi Oron
Subject: Using permutations
Date: Thu, 10 Feb 2000 16:05:47 +0100

Hi,

First of all, I would like to thank all of those who answered my last
question about EZBin (Marcus Daniels,  Paul Johnson).

Again, I would like to have some help, but with another
object: Permutation.

I try to get random permutation of a list (neigborsList) in this way:

      neigborsPermuteList = [Permutation createBegin: [modelSwarm
        getZone]];
      [neigborsPermuteList setUniformRandom: uniformUnsRand];
      [neigborsPermuteList setCollection: neigborsList];
      neigborsPermuteList = [neigborsPermuteList createEnd];

      [neigborsPermuteList generatePermutation];

So I could send a message to the list in a random order:

      [neigborsPermuteList forEach: M(testAndUpgrade)];

But, I get the message:

*** event raised for error: InvalidArgument
*** function: _i_Object_s__doesNotRecognize_(), file: /home/alex
/redhat/BUILD/swarm-2.0.1/src/defobj/DefObject.m, line: 872
Permutation_c does not recognize generatePermutation*** executio
n terminating due to error

Now that I take a look in "collections/Permutation.h" it is true that
"generatePermutation" is undefined (while it does appear in the docs).

Any solution? Somebody has an example of using a permutation? (not
shuffling!)

Best regards.

PS. Sorry for posting this message in swarm-forum first...
--- Begin Message --- Subject: Using permutations Date: Thu, 10 Feb 2000 12:52:09 +0100
Hi,

First of all, I would like to thank all of those who answered my last
question about EZBin (Marcus Daniels,  Paul Johnson).

Again, I would like to have some help, but with another
object: Permutation.

I try to get random permutation of a list (neigborsList) in this way:

      neigborsPermuteList = [Permutation createBegin: [modelSwarm
        getZone]];
      [neigborsPermuteList setUniformRandom: uniformUnsRand];
      [neigborsPermuteList setCollection: neigborsList];
      neigborsPermuteList = [neigborsPermuteList createEnd];

      [neigborsPermuteList generatePermutation];

So I could send a message to the list in a random order:

      [neigborsPermuteList forEach: M(testAndUpgrade)];

But, I get the message:

*** event raised for error: InvalidArgument
*** function: _i_Object_s__doesNotRecognize_(), file: /home/alex
/redhat/BUILD/swarm-2.0.1/src/defobj/DefObject.m, line: 872
Permutation_c does not recognize generatePermutation*** executio
n terminating due to error

Now that I take a look in "collections/Permutation.h" it is true that
"generatePermutation" is undefined (while it does appear in the docs).

Any solution? Somebody has an example of using a permutation? (not
shuffling!)

Best regards.



--- End Message ---

reply via email to

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