On Sun, Feb 21, 2010 at 5:36 PM, David Ward Lambert
<[email protected]> wrote:
> might affect the result making this request unreasonable.  For instance,
> is the structural odometer that a non-mathematician might prefer less
> efficient than base representation?
>
> odometer =: #: i.@(*/)         NB. mathematician's version perhaps
> odometer2=: [: |: */ $&> */\...@}.@(,&1) #&.> i.&.>   NB. Structural

http://www.jsoftware.com/help/phrases/execution_time_space.htm

   ts=:6!:2,7!:2...@]
   ts 'odometer p:i.5'
3.52e_5 133248
   ts 'odometer2 p:i.5'
0.000124876 264832

the "mathematician's version" seems considerably more
efficient than the alternative for this example that I
randomly choose.

The same approach can be used to investigate other
cases.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to