- java.lang.Object
-
- com.pervasive.datarush.analytics.arm.GenerateCombinations
-
public class GenerateCombinations extends Object
A combination generator capable of generating combinations of a given array of integers.
-
-
Constructor Summary
Constructors Constructor Description GenerateCombinations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateCombinations()Generate the wanted combinations according to the parameters set in theinitmethod.List<int[]>getResults()Retrieve the list of generated combinations.voidinit(int range, int[] values, int setSize)Initialize the generator.
-
-
-
Method Detail
-
init
public void init(int range, int[] values, int setSize)Initialize the generator. This must be invoked before attempting to generate combinations. A generator instance can be initialized and used many times.- Parameters:
range- the number of input values to utilizevalues- the input values to combinatorializesetSize- the desired output set size
-
generateCombinations
public void generateCombinations()
Generate the wanted combinations according to the parameters set in theinitmethod.
-
getResults
public List<int[]> getResults()
Retrieve the list of generated combinations. This list is cleared every time theinitmethod is invoked.- Returns:
- generated combinations
-
-