Package com.pnfsoftware.jeb.util.base
Class Tuples
java.lang.Object
com.pnfsoftware.jeb.util.base.Tuples
Integer tuples generator routines.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateIntegerTuples
(int n) Generate all tuples containing the numbers 0 to n-1.
-
Constructor Details
-
Tuples
public Tuples()
-
-
Method Details
-
generateIntegerTuples
Generate all tuples containing the numbers 0 to n-1. Be careful, n! tuples will be generated.For instance, for n=3, the tuples are:
(0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1), (2,1,0)
- Parameters:
n
- the tuple size- Returns:
- the list of tuples, or null is n<=0
-