[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Too many permutations computed
From: |
Emanuel Berg |
Subject: |
Re: Too many permutations computed |
Date: |
Thu, 03 Aug 2023 18:08:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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 ... )
--
underground experts united
https://dataswamp.org/~incal
Re: Too many permutations computed, tpeplt, 2023/08/03