java.lang.Object
com.pervasive.datarush.analytics.arm.GenerateCombinations
A combination generator capable of generating combinations
of a given array of integers.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GenerateCombinations
public GenerateCombinations()
-
-
Method Details
-
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
Retrieve the list of generated combinations. This list is cleared every time theinitmethod is invoked.- Returns:
- generated combinations
-