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

Re: [plt-scheme] Arrays and scheme



Roberto Brunelli <brunelli@itc.it> writes:

> I would like to write some mzscheme extensions for image processing:
>
> is there any support for vector/array (matrix) whose elements are
> homogeneous (say int/float)
> so that C++ extensions can directly link to this kind of data?

AFAICT no, there's no such thing in PLT Scheme right now.
Nevertheless, you may want to port¹ "SRFI-4: Homogeneous numeric vector
datatypes", which is exactly what it does.

                   http://srfi.schemers.org/srfi-4/

at http://sourceforge.net/projects/schematics we already have some
surfies ported, but not 4 I'm afraid.

--Francisco

Footnotes: 
¹  Porting reference implementations (or other implementations) of
surfies to PLT is very easy, most of the time (see SRFI-2, for one
reference implementation that didn't help at all :).  For SRFI-4,
however, you will want to hack /read/, and /write/ procedures, so you
ought to ask Matthew how easy (acceptable?) would that be.