Re: Permutations

new topic     » goto parent     » topic index » view thread      » older message » newer message

> That function is a permutation function.
> It will generate any requested permutation based on index and
> permutation set.

Ah, I see. It would take a while to generate if the set was 1 million
objects in length, though. It *would* be more secure than a fixed
offset from the last point to the next.

One thing is, that the function needs to return indexes, not the
values themselves, so that if I had this:
x = perm(original_sequence, number)
new = {}
for a = 1 to length(x) do
    new &= original_sequence[ x[a] ]
end for
--at this point, new contains the permutation

how would I alter the code snippet you gave me?

-- 
MrTrick

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu