On Mon, Mar 17, 2008 at 10:34 AM, Sharan Basappa <[EMAIL PROTECTED]> wrote: > Rob, > > Actually you are correct. I was on my way to implement permutation for > a given set of numbers. > In that context, I had designed my own algo as a part of bigger > problem I am trying to solve. > That algo requires rotate and factorial. Rotate to get different > combinations and factorial to limit for loop. > Today, I happened to go through Steinhaus-Johnson-Trotter's algo for the > same. > It looks elegant and should be efficient. I plan to use this. > Question: Does anyone know if perl has inuilt function to implement > Steinhaus-Johnson-Trotter's?snip snip
I don't know what algorithm Algorithm::Permute* uses, but it seems fairly fast. * http://search.cpan.org/dist/Algorithm-Permute/Permute.pm -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/