Class MaxCoverGenerator
java.lang.Object
org.ddolib.examples.maximumcoverage.MaxCoverGenerator
Utility class for generating and measuring instances of the Maximum Coverage (MaxCover) problem.
This class provides methods to:
- Create random MaxCover instances with specified parameters
- Optionally compute the optimal solution using brute-force
- Generate multiple instances for benchmarking
- Generate all combinations of k elements among n for brute-force computation
Generated instances are saved to disk in a specific text format.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MaxCoverGenerator
public MaxCoverGenerator()
-
-
Method Details
-
main
Program entry point.By default, calls
measureInstance()to generate benchmark instances.- Parameters:
args- command-line arguments (not used)
-
generateCombinations
Generates all non-ordered combinations of k elements from n.- Parameters:
n- the total number of elementsk- the size of each combination- Returns:
- a list of sets, each representing a combination of k elements
-