Groups
Groups
Sign in
Groups
Groups
FriCAS - computer algebra system
Conversations
About
Send feedback
Help
index <---> lookup
6 views
Skip to first unread message
Ralf Hemmecke
unread,
Dec 6, 2019, 7:56:01 PM
12/6/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fricas-devel
I find the types of "lookup" and "index" in FriCAS a bit strange.
http://fricas.github.io/api/Finite.html#l-finite-index
index: PositiveInteger -> %
lookup: % -> PositiveInteger
Yes, it's just a definition, but I would have expected that
"index" returns the index of an element, i.e. a number.
And lookup(i) gives the i-th element.
Interestingly, in the Aldor library it's exactly as I would expect.
https://github.com/pippijn/aldor/blob/master/aldor/lib/algebra/src/categories/sit_fset.as
index: % -> Z;
lookup: Z -> %;
Ralf
Reply all
Reply to author
Forward
0 new messages