[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Too many permutations computed
From: |
Heime |
Subject: |
Re: Too many permutations computed |
Date: |
Fri, 04 Aug 2023 18:39:26 +0000 |
Sent with Proton Mail secure email.
------- Original Message -------
On Friday, August 4th, 2023 at 4:08 AM, Emanuel Berg <incal@dataswamp.org>
wrote:
> uzibalqa wrote:
>
> > > (while (< j h) [...]
> > > (setq j (1+ j)))
> > > [...]
> > > for i := 0; i < k-1; i += 1 do [...]
> >
> > Do you understand what the i += 1 does ? It is the same as
> > i++, am I right ? The difference lies in the timing of when
> > the increment takes place (immediately in the case of i +=
> > 1, and after the value is used in the case of i++). Do you
> > think the distinction mentioned makes a difference for the
> > algorithm ?
>
>
> It is up to the designer of the pseudo code to decide if it
> works like that, if it does then it would make
> a difference, yes.
>
> See if you can write the Elisp as close as possible to the
> pseudo code, including the variable names:
>
> (cl-loop for i from 0 to ... )
Yes, I have got working properly with the cl-loop change.
Re: Too many permutations computed, tpeplt, 2023/08/03