Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

La funzione dei tipi in APL

67 views
Skip to first unread message

Rosario19

unread,
Nov 17, 2023, 2:38:46 AM11/17/23
to
Forse in qualche giorno sono riuscito a riscrivere la funzione dei
tipi...

Un tipo non e' altro che uno scalare di tipo int per gli scalari
oppure se non si tratta di scalare una lista di numeri tipo int
Scrivere in APL una funzione dei tipi T che ritorna i seguenti valori
|¯1 errore
|1 Zilde
|2 Float|3 Int|4 Char|5 Complex,Quaternion or Oction|6 other scalar|7 multi elementi|8 int float|32 List|33 Matrix|34 Tensor

Esempi
o{leftarrow}{quad}fmt
o T 1
3
~
o T 23.89
2
~
o T 8J9
5
~
o T '4'
4
~
o T '445'
+2----+
¦ 32 4¦
+~----+
T (2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3 {overbar}1)
32 7
T {epsilon}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
{overbar}1)
32 8
o T ,2 2{rho}(1 0)(2 0)(2 0)(4 0)
+3-------+
¦ 32 32 3¦
+~-------+
o T 2 2{rho}(1 0)(2 0)(2 0)(4 0)
+3-------+
¦ 33 32 3¦
+~-------+
o T {leftshoe}{leftshoe}{rightshoe}(2.8 2 2)(1 5
{overbar}3)({overbar}1 {overbar}3 {overbar}1)
+4--------+
¦ 6 6 33 8¦
+~--------+
o T {leftshoe}{leftshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1
{overbar}3 {overbar}1)
+4--------+
¦ 6 6 32 7¦
+~--------+
o T 1,{dieresis}1 2 3 4
+3-------+
¦ 32 32 3¦
+~-------+
o T {leftshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
{overbar}1)
+3------+
¦ 6 32 7¦
+~------+
o T (2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
{overbar}1)
+2----+
¦ 32 7¦
+~----+
o T {rightshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
{overbar}1)
+2----+
¦ 33 8¦
+~----+
o {rightshoe}(2.8 2 2)(1 5 {overbar}3)({overbar}1 {overbar}3
{overbar}1)
+3----------+
3 2.8 2 2¦
¦ 1 5 ¯3¦
¦ ¯1 ¯3 ¯1¦
+~----------+
o T {zilde}
1
~
o T
{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}{zilde}
+2----+
¦ 32 1¦
+~----+
o T {iota}1 2 3 4
+3-------+
¦ 34 32 3¦
+~-------+
o T ({leftshoe},1)
+3------+
¦ 6 32 3¦
+~------+
o T ({leftshoe},{apostrophe}5{apostrophe})
+3------+
¦ 6 32 4¦
+~------+

Qualcuno nota qualcosa che non va?

Rosario19

unread,
Nov 20, 2023, 5:41:00 AM11/20/23
to
({leftshoe},1)( (1 2) (1 3))
+2---------------------+
Ś+----+ +2------------+Ś
ŚŚ+1-+Ś Ś+2---+ +2---+ŚŚ
ŚŚŚ 1ŚŚ ŚŚ 1 2Ś Ś 1 3ŚŚŚ
ŚŚ+~-+2 Ś+~---+ +~---+2Ś
Ś+?---+ +?------------+3
+?---------------------+
(,1)(1 2)
+2----------+
Ś+1-+ +2---+Ś
ŚŚ 1Ś Ś 1 2ŚŚ
Ś+~-+ +~---+2
+?----------+

It seems that the type of (,1) is the same of the type of (1,2): list
of integer
but the type of ({leftshoe},1) is not the same of the type ((1 2)(3
4))
so (,1) is a list of integer but ({leftshoe},1) is not a list of list
of integer
is that right? Why?

It seems to me that if (,1)(1 2) is one array of array of integers
({leftshoe},1)( (1 2) (1 3)) has to be one array of array of array of
integers

or I think not ok

T ({leftshoe},1)( (1 2) (1 3))
+2----+
Ś 32 7Ś
+~----+
T (,1)(1 2)
+3-------+
1 32 32 3Ś
+~-------+

Rosario19

unread,
Nov 29, 2023, 11:36:21 AM11/29/23
to
On Mon, 20 Nov 2023 11:40:13 +0100, Rosario19 <R...@invalid.invalid>
wrote:
vediamo se funziona l'allegato

Sudleyplace

unread,
Nov 30, 2023, 10:40:56 AM11/30/23
to
Sorry, but I don't see any attachment. You can communicate directly with me at bsm...@sudleyplace.com, and we can setup your email/browser for UTF-8 encoding which will allow you to see APL characters in the text.

Rosario19

unread,
Dec 1, 2023, 1:22:36 AM12/1/23
to
On Wed, 29 Nov 2023 17:35:40 +0100, Rosario19 <R...@invalid.invalid>
wrote:

>On Mon, 20 Nov 2023 11:40:13 +0100, Rosario19 <R...@invalid.invalid>
>wrote:
>
>> ({leftshoe},1)( (1 2) (1 3))
>>+2---------------------+
>>¦+----+ +2------------+¦
>>¦¦+1-+¦ ¦+2---+ +2---+¦¦
>>¦¦¦ 1¦¦ ¦¦ 1 2¦ ¦ 1 3¦¦¦
>>¦¦+~-+2 ¦+~---+ +~---+2¦
>>¦+?---+ +?------------+3
>>+?---------------------+
>> (,1)(1 2)
>>+2----------+
>>¦+1-+ +2---+¦
>>¦¦ 1¦ ¦ 1 2¦¦
>>¦+~-+ +~---+2
>>+?----------+
>>
>>It seems that the type of (,1) is the same of the type of (1,2): list
>>of integer
>>but the type of ({leftshoe},1) is not the same of the type ((1 2)(3
>>4))
>>so (,1) is a list of integer but ({leftshoe},1) is not a list of list
>>of integer
>>is that right? Why?
>>
>>It seems to me that if (,1)(1 2) is one array of array of integers
>>({leftshoe},1)( (1 2) (1 3)) has to be one array of array of array of
>>integers
>>
>>or I think not ok
>>
>> T ({leftshoe},1)( (1 2) (1 3))
>>+2----+
>>¦ 32 7¦
>>+~----+
>> T (,1)(1 2)
>>+3-------+
>>1 32 32 3¦
>>+~-------+
>
>vediamo se funziona l'allegato

TT?{m?T¨,??1=?k??m:k?(3 2)=k[?k]:8?7}
TT?{m?T¨,??1=?k??m:k?(3 2)=k[?k]:8?7}

Bob Smith

unread,
Dec 2, 2023, 3:01:32 AM12/2/23
to
It looks like your newsgroup client uses a message encoding other than
UTF-8. Please find that setting, and change it to UTF-8. This change
will allow you to display APL chars natively in this newsgroup. Search
for the word "encoding" in your newsgroup settings and change the value
to UTF-8.

--
_________________________________________
Bob Smith -- bsm...@sudleydeplacespam.com
http://www.sudleyplace.com - http://www.nars2000.org

To reply to me directly, delete "despam".
0 new messages