I have created a bit of code for gsll that uses a vector of vectors. I use this for tabular data (https://github.com/mirkov/data-table).
I use raw CL for that, even though the outer vector can store foreign arrays. That way, I can do interpolation and fitting. The code is still a bit raw, and the object model may need cleaning up.
A nice thing is that I can query and reshuffle the table, much like the database features in chapter 27 of Seibel's Practical Common Lisp.
I would like to make this more grid compatible, but I am just too tired to figure it out. So, is it possible to - create a vector of vectors in grid - can grid use aref to access individual elements, or am I stuck with a nested aref
Thanks,
Mirko
Mirko,
I have intended the definition of grids permit elements to themselves be grids, but it is not yet implemented. I started to do the work, but put it aside to get the basic functionality of "simple grids" working. You can see what I've done in grid/multiarray.lisp (which is not compiled or loading currently). The specification syntax is built to accommodate nested arrays, but currently you can only make simple grids, i.e., those whose elements are numbers.
If you want to take a hack at it, I can probably help in guiding you at least in what I was thinking. Once properly implemented, all the grid functions should work fine.
Liam
On Tue, Nov 13, 2012 at 8:49 AM, Mirko Vukovic mirko.vukovic@gmail.comwrote:
I have created a bit of code for gsll that uses a vector of vectors. I use this for tabular data (https://github.com/mirkov/data-table).
I use raw CL for that, even though the outer vector can store foreign arrays. That way, I can do interpolation and fitting. The code is still a bit raw, and the object model may need cleaning up.
A nice thing is that I can query and reshuffle the table, much like the database features in chapter 27 of Seibel's Practical Common Lisp.
I would like to make this more grid compatible, but I am just too tired to figure it out. So, is it possible to
- create a vector of vectors in grid
- can grid use aref to access individual elements, or am I stuck with
a nested aref
Thanks,
Mirko
Antik-devel mailing list Antik-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/antik-devel
Liam,
I looked at the code. I'll take your email as an offer to guide. And you can take this email as an offer to hack.
A few questions:
What type should a vector of vectors be? Currently, you are specializing on lists and arrays. Should I define a new type, or should it be of array type where specify vector of vectors in `rest-spec' of make-grid-data?
In the former case, we will have a proliferation of new data structures.
In the latter case, the methods that specialize on array (make-array, grid-ref) would have to do some internal testing and then branching off.
Are grids meant to be extendable (like vector-push-extend)? I would argue for that capability.
Mirko
On Thu, Nov 15, 2012 at 11:03 PM, Liam Healy lhealy@common-lisp.net wrote:
Mirko,
I have intended the definition of grids permit elements to themselves be grids, but it is not yet implemented. I started to do the work, but put it aside to get the basic functionality of "simple grids" working. You can see what I've done in grid/multiarray.lisp (which is not compiled or loading currently). The specification syntax is built to accommodate nested arrays, but currently you can only make simple grids, i.e., those whose elements are numbers.
If you want to take a hack at it, I can probably help in guiding you at least in what I was thinking. Once properly implemented, all the grid functions should work fine.
Liam
On Tue, Nov 13, 2012 at 8:49 AM, Mirko Vukovic mirko.vukovic@gmail.com wrote:
I have created a bit of code for gsll that uses a vector of vectors. I use this for tabular data (https://github.com/mirkov/data-table).
I use raw CL for that, even though the outer vector can store foreign arrays. That way, I can do interpolation and fitting. The code is still a bit raw, and the object model may need cleaning up.
A nice thing is that I can query and reshuffle the table, much like the database features in chapter 27 of Seibel's Practical Common Lisp.
I would like to make this more grid compatible, but I am just too tired to figure it out. So, is it possible to
- create a vector of vectors in grid
- can grid use aref to access individual elements, or am I stuck with
a nested aref
Thanks,
Mirko
Antik-devel mailing list Antik-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/antik-devel
On Fri, Nov 16, 2012 at 9:12 AM, Mirko Vukovic mirko.vukovic@gmail.comwrote:
Liam,
I looked at the code. I'll take your email as an offer to guide. And you can take this email as an offer to hack.
A few questions:
What type should a vector of vectors be? Currently, you are specializing on lists and arrays. Should I define a new type, or should it be of array type where specify vector of vectors in `rest-spec' of make-grid-data?
I don't know what you mean. Types and classes are different things, and specialization takes place on classes.
My idea is that the specification of a vector of vectors of double-floats is e.g. ((array 3) (array 4) double-float) so this would look to CL like something of type array or vector. There isn't a need to define a new type, but I suppose you could make one up. I'm not sure what purpose it would serve.
In the former case, we will have a proliferation of new data structures.
In the latter case, the methods that specialize on array (make-array, grid-ref) would have to do some internal testing and then branching off.
cl:make-array is not anything we can do anything about, it is not a generic function. make-grid would need to be generalized to make a multiarray, yes. There is work there to be done. grid-ref is obsolete; you would need to modify grid:aref, grid:aref*, (setf grid:aref), (setf grid:aref*). (The file multiarray.lisp is old and has not been touched in over a year, it was just a collection point for the temporarily abandoned multiarray code and grid changes took place without it being modified after that.)
Are grids meant to be extendable (like vector-push-extend)? I would argue for that capability.
That would be nice, but I haven't thought about how to do it. Also nice would be to handle displaced arrays and views (subarrays that aren't actually copied out of the original array). I think Tamas has done some work on displaced arrays.
Mirko