For l=2 we can use the indexes of a sparse identity matrix.  Set the common value to 1.  I haven't given any thought to generalization for higher dimensions.

   vardwl2=: 4$.$.@:-.@:=@:i.

      ;/   vardwl2 4
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
│0 1│0 2│0 3│1 0│1 2│1 3│2 0│2 1│2 3│3 0│3 1│3 2│
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘

Date: Fri, 8 Dec 2017 15:30:33 -0500
From: Jimmy Gauvin<[email protected]>
To:[email protected]
Subject: Re: [Jprogramming] contents of a package, permutations
Message-ID:
        <caelwgocckair1rvd_fb_t+e+6n10zdncsr6jtarmha5jdek...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

There is a recent thread you might be interested in:

http://jsoftware.com/pipermail/programming/2017-August/048275.html

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

Reply via email to