,4 $. $. loc = y {This works for a scalar y}
($loc)#:I.,loc = y {This is probably faster for a scalar y}
Not sure why you use i. ?
Paul Gauthier
APL Software Developer - Senior
[EMAIL PROTECTED]
Phone: 312-739-3467
Fax: 312-739-3496
CheckFree. The Company that Powers Payment on the WebSM.
http://www.checkfree.com/paybillsonline
Tracy Harms <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
04/30/2007 02:12 PM
Please respond to
General forum <[email protected]>
To
[email protected]
cc
Subject
[Jgeneral] identifying the coordinates of a unique atom
My last little J project has been posted on the wiki:
http://www.jsoftware.com/jwiki/TracyHarms/misc/wrapmap
I'd like peer review of one portion of my code, in
particular, where I suspect it may be clunky.
Where loc is a table of unique (location) values, I
used the following phrase to obtain the coordinate
vector identifying the given value within the table.
,4 $. $. -. y i. loc
While I understand how this functions to get the
result I desired, it seems to me that I've used i. in
a manner contrary to its design. My hunch is that my
solution is either awkward or eccentric, and that I've
not yet learned the more natural way to accomplish
coordinate identification.
If that is true, I'd like to know. (If, instead, my
technique lies among the set of reasonable
alternatives, that would be nice to learn, too.)
Tracy Harms
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm