help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Too many permutations computed


From: uzibalqa
Subject: Re: Too many permutations computed
Date: Thu, 03 Aug 2023 15:42:53 +0000

------- Original Message -------
On Wednesday, August 2nd, 2023 at 10:13 PM, Emanuel Berg <incal@dataswamp.org> 
wrote:

> uzibalqa wrote:
> 
> > (while (< j h) [...]
> > (setq j (1+ j)))
> > [...]
> > for i := 0; i < k-1; i += 1 do [...]
> 
> 
> You can replace that `while' with a for loop using` cl-loop'
> and for, to make it a closer match to the pseudo-code.
> 
> This: (setq j (1+ j)) can be replaced by `cl-incf' as in
> (cl-incf j) - but better yet is to get away with that and use
> a for loop to iterate instead.
> 
> Again you can check out these two
> 
> https://dataswamp.org/~incal/emacs-init/perm.el
> https://www.emacswiki.org/emacs/StringPermutations
> 
> but after spending so much time on your own solution I get it
> you want to complete it ...

Obviously, my implementation is not computing things as expected.
My current focus is to get it to work by being as close as possible 
to the algorithm so I can get it working as it should.
 
> --
> underground experts united
> https://dataswamp.org/~incal



reply via email to

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