'<' missed. 16 (< 0;0) } i.4 4 works fine.
On Mon, Nov 9, 2015 at 12:22 PM, Linda A Alvord
wrote:
> All I want to do is change the item in the first row and column to a 16. I
> can't seem to think of a name to call the verb I need. Amend seems to only
> apply to rows.
>
> 16 (0;0) } i.4 4
Intresting! I have learned much more from this topic than I have in the
last year with J.
On Sun, Apr 5, 2015 at 8:12 PM, David Lambert wrote:
> http://www.jsoftware.com/jwiki/Essays/Odometer
>
> Fastest of these is the sparse solution
> (4 $. $.)@($&1)
>
> To fill your table assuming you've use
is: first make sure you are computing the
> right result - that you are solving the right problem. It's not worth
> bothering to trying to do anything else until you've gotten past that
> point.
>
> Once you have a sample solution (and that includes having reasonably
> sized e
:
> It's unusual in J to need the full odometer array. Are you sure that your
> problem requires it?
>
> Henry rich
>
> On 4/4/2015 5:48 PM, Sergeif wrote:
>
>> Thanks! It's 10x faster than my code but 10x slower than odometer
>> function.
0 2 1
> > 0 2 2
> > 0 2 3
> >
> >
> > 1 0 0
> > 1 0 1
> > 1 0 2
> > 1 0 3
> >
> > 1 1 0
> > 1 1 1
> > 1 1 2
> > 1 1 3
> >
> > 1 2 0
> >
Nice! I missed a #: verb. Thanks a lot.
On Sat, Apr 4, 2015 at 11:20 PM, Henry Rich wrote:
> Standard idiom (we call it the odometer function):
>
> ind3d =: (#: i.@(*/))
>
> It's very fast.
>
> Henry Rich
>
> On 4/4/2015 5:09 PM, Sergeif wrote:
>
>>
Hi.
How can someone create list of indexes of 3d table (N x M x K)?
I have written this simple code:
ind3d =: 3 : 0
'n m k' =. y
p0 =. k&|
p1 =. (m&|)@:<.@:(%&k)
p2 =. <.@:(%&(m*k))
(p2 , p1 , p0)"0 (i. (n*m*k))
)
but it's very very slow. Does any tacit solution for this problem exist?
Another