Thank you for these helpful explanations and pointers.

I did have a feeling that "combinations" was the wrong term. The informal
term "odometer" nicely captures the intuition here and the examples in the
Odometers Essay provide excellent examples of how to do this sort of thing
in J.

It is also interesting to note how J's various vector-processing constructs
often permit several alternative solutions to the same problem, as seen
here.

And I now see that the "Antibase" dictionary entry did actually already have
everything I needed - I should have run the example in stages, to see the
intermediate results of invoking Antibase on Base.

Thank you for this help and for making the J language available. J is one of
the rare languages that is truly a pleasure to work with.

Roger Hui wrote:

What you are generating are usually not called "combinations"

as order is not relevant in combinations, nor are duplications

permitted in a combination.

Different ways of generating the desired result are described in

http://www.jsoftware.com/jwiki/Essays/Odometer

*> As a side note - I am curious if there is a more compact way of representing*

*> the repetitive phrase:*

*> (i. 6);(i. 6);(i. 6)

*

i.&.> 6 6 6

3$<i.6

*> Upon first reading, it wasn't clear to me from the definition of dyad*

*> Antibase provided in the Vocabulary here:*

*> **http://www.jsoftware.com/help/dictionary/d402.htm*
<http://www.jsoftware.com/help/dictionary/d402.htm>

*> that its x argument could be an integer array each of whose *

*> elements is the desired base.

*

The first example in the dictionary entry for the dyad #:

uses an integer array left argument.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to