<div class="gmail_quote">On Fri, Nov 16, 2012 at 9:12 AM, Mirko Vukovic <span dir="ltr"><<a href="mailto:mirko.vukovic@gmail.com" target="_blank">mirko.vukovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Liam,<br>
<br>
I looked at the code. I'll take your email as an offer to guide. And<br>
you can take this email as an offer to hack.<br>
<br>
A few questions:<br>
<br>
What type should a vector of vectors be? Currently, you are<br>
specializing on lists and arrays. Should I define a new type, or<br>
should it be of array type where specify vector of vectors in<br>
`rest-spec' of make-grid-data?<br></blockquote><div><br>I don't know what you mean. Types and classes are different things, and specialization takes place on classes.<br><br>My idea is that the specification of a vector of vectors of double-floats is e.g.<br>
((array 3) (array 4) double-float)<br>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.<br>
<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
In the former case, we will have a proliferation of new data structures.<br>
<br>
In the latter case, the methods that specialize on array (make-array,<br>
grid-ref) would have to do some internal testing and then branching<br>
off.<br></blockquote><div><br>cl:make-array is not anything we can do anything about, it is not a generic function.<br>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.)<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Are grids meant to be extendable (like vector-push-extend)? I would<br>
argue for that capability.<br></blockquote><div><br>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. <br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Mirko</font></span><br></blockquote></div>