On 6/11/07, John Randall <[EMAIL PROTECTED]> wrote:
The vectors v and i give combinations of piece value and piece index,
and these have to be inserted into separate copies of a. The result
is a list of successors of position a. These must be further
processed (depth first on an explicit stack or recursively to satisfy
the rules). The common size of v and i is at most 102, and is often a
lot less.
If I understand you correctly,
assert *./0=i{a
should always be valid.
In other words, you might use
(v*i=/i.#a)+"1 a
?
This looks to be about a third as fast as a theoretical maximum
speed implementation for this operation. You might be able to
go faster, but not outrageously so.
Or have I misunderstood your situation?
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm