[Jprogramming] Another Abbreviation
Dan Bron
j at bron.us
Tue Oct 5 01:00:22 HKT 2010
Roger wrote:
> I suspect v"0 would serve. If it
> does not, I'd like to see what such a v is.
Viktor replied:
> a =: 1 : '$ $ u@,'
> v =: 5&,
>
> v"0 i. 2 2
> [vs]
> v a i. 2 2
Roger responded:
> The intent of my question [was for]
> some practical use that breaks
> the equivalence.
I cited some practical uses in [1] (and the last citation will tell you how
I found them, and how you might find others).
One use is in JSoftware's standard library, where a matrix needs to be
passed to a library written in a less array friendly language, so the input
is raveled to vector, and the output reshaped into a matrix.
On a historical note, both Kirk Iverson and I had something analogous to
UnderRavel in our personal utilities scripts. So we must have found some
repeatable use for the pattern (though I admit I cannot remember an example
right now, and also my utilities script has collected some less-than-useful
specimens...)
-Dan
[1] Earlier post in this thread:
http://www.jsoftware.com/pipermail/programming/2010-October/020648.html
More information about the Programming
mailing list