Because init() uses oneToN1  which is a variable that is initialized only
once when the Domain is created.

Try to make oneToN1 into a function.

- Qian

On Mon, Jan 22, 2024, 10:11 PM Prof. Dr. Johannes Grabmeier <
[email protected]> wrote:

> example to 1.:
>
> after
>
> )co iml
>
> )co fidepermutationsINIT
>
> one gets
>
> (1) -> n1()$FideTransposition
>
>     (1)  1
> Type: NonNegativeInteger
> (2) -> n2()$FideTransposition
>
>     (2)  1
> Type: NonNegativeInteger
> (3) -> n()$FideTransposition
>
>     (3)  2
> Type: NonNegativeInteger
> (4) -> init()$FideTransposition
>     init() called using oneToN1 = [1]
>
>     (4)  [1]
> Type: FideTransposition
> (5) -> set(3,5)$FideTransposition
>
>     (5)  [3, 5]
> Type: List(NonNegativeInteger)
> (6) -> n1()$FideTransposition
>
>     (6)  3
> Type: NonNegativeInteger
> (7) -> n2()$FideTransposition
>
>     (7)  5
> Type: NonNegativeInteger
> (8) -> n()$FideTransposition
>
>     (8)  8
> Type: NonNegativeInteger
> (9) -> init()$FideTransposition
>
>     (9)  [1]
> Type: FideTransposition
>
> expected answer is [1,2,3]
>
>
>
> Am 22.01.24 um 13:51 schrieb Qian Yun:
> >
> > On 1/22/24 20:46, Prof. Dr. Johannes Grabmeier wrote:
> >> Dear all,
> >>
> >> 1. following problem: I use Reference NNI to change internal values
> >> of a domain. A further constant function: init: () ->% depends of the
> >> changed values. It seems that FriCAS does not call the constant
> >> function again, but stores the old value of init(), then out of date.
> >> Non constant functions of course correctly use the changed values.
> >> How can I bring FriCAS to *call *and *evaluate* again the constant
> >> function with the updated values?
> >>
> >> 2. Another, very strange problem was noted:
> >>
> >> The referenced values where in a domain called
> >>
> >> )abbrev domain FIDETR FIDETransposition
> >>
> >> Believe me or not: the changing of the referenced values did not work!
> >>
> >> After long searching of the reasons I found: this depended on the
> >> name "FIDETransposition", i.e. the change to
> >>
> >> )abbrev domain FIDETR FideTransposition
> >>
> >> caused, that changing of referenced values work as expected! Can send
> >> an example, if someone is interested.
> >>
> >
> > Yes, examples please, otherwise it's hard to debug.
> >
> > Problem in 1 should not happen, because there are similar things in
> > FriCAS code base and they work well.  So please show me the example.
> >
> > - Qian
> >
> --
> Mit freundlichen Grüßen
>
> Johannes Grabmeier
>
> Prof. Dr. Johannes Grabmeier,
> Köckstraße 1, D-94469 Deggendorf
> Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
> Fax: +49-(0)-991-2979592
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fricas-devel/76a5fc70-c37b-4502-9c5a-974a0d250d86%40grabmeier.net
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAGBJN93WUG2%3DnGb7CbUyMc1NTY9MZbj%2BwawAcRKdYLydrG%2B9cw%40mail.gmail.com.

Reply via email to