slib-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Slib-discuss] arrays


From: glbrune
Subject: Re: [Slib-discuss] arrays
Date: Mon, 26 Sep 2011 02:03:38 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.3.4)

Thank you very much for the examples.

In the case of the mapping functions, I saw that it also helps if I check the order of the parameters in the sources.

Best regards

Gian Luca Brunetti


Def. Quota Aubrey Jaffer <address@hidden>:

 | Date: Sun, 25 Sep 2011 14:20:20 +0200
 | From: address@hidden
 |
 | I am looking for simple examples about the use of the most basic
 | functions in the arrays packages in Slib ('array, 'subarray,
 | 'array-for-each and 'array-interpolate). I would be very grateful
 | if someone could point me to some of them.

(define ra (make-array (A:floR64b) 5 7)) makes a five by seven array
of uninitialized 64-bit floating-point real numbers.

(define ra (make-array (A:fixZ32b -1) 5 7)) makes a five by seven
array of 32-bit integers, all set to -1.

(define ra (make-array (vector #t) 5 7)) makes a five by seven
array of Scheme values, all set to #t.

(array-ref ra 0 6) returns the last column of the first row.

(array-set! ra 88 0 6) sets the last column of the first row to 88.
Notice that the argument after RA is the new value.

http://people.csail.mit.edu/jaffer/ has examples for the subarray,
array-for-each and array-interpolate modules.

_______________________________________________
Slib-discuss mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/slib-discuss




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]