Email list hosting service & mailing list manager

array with index mapper - Java-based implementation Per Bothner (24 Aug 2015 17:09 UTC)
Re: array with index mapper - Java-based implementation John Cowan (24 Aug 2015 18:24 UTC)
Re: array with index mapper - Java-based implementation Per Bothner (24 Aug 2015 19:40 UTC)
Re: array with index mapper - Java-based implementation Bradley Lucier (26 Aug 2015 15:05 UTC)
Re: array with index mapper - Java-based implementation John Cowan (26 Aug 2015 16:50 UTC)
Re: array with index mapper - Java-based implementation Per Bothner (26 Aug 2015 20:38 UTC)
Re: array with index mapper - Java-based implementation John Cowan (26 Aug 2015 21:45 UTC)

Re: array with index mapper - Java-based implementation John Cowan 24 Aug 2015 18:24 UTC

Per Bothner scripsit:

> A fixed array consists of an indexer (a general integer array)
> and a backing store (a uniform or general vector).

As I noted in an earlier email, hash tables (from integers to objects)
are also appropriate backing stores and should be supported.  In addition,
it would be useful to allow bytevectors seen as uniform arrays per R6RS.

> Indexing the fixed array uses the indexer to transforms the source indexes
> to an index in the backing store vector.

But how?  (I have not tried to make my way through the Java code.)

In particular, are you using the NumPy/Julia stride model, in which
indexer[n] gives the distance (measured in backing-store-elements) between
consecutive elements that differ by 1 in dimension n?  If not, I strongly
recommend it.  It is an encoded form of the affine transformations of
SRFI 25.

In addition, there should be an offset, conceptually part of the indexer,
which is added to the final computation.  This corresponds to the constant
part of the SRFI-25 affine transformation.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
   There was an old man                Said with a laugh, "I
     From Peru, whose lim'ricks all      Cut them in half, the pay is
       Look'd like haiku.  He              Much better for two."
                                             --Emmet O'Brien