Package org.ddolib.examples.lcs
Class LCSGenerator
java.lang.Object
org.ddolib.examples.lcs.LCSGenerator
Contains method to generate instances of the LCS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidgenerateRandomInstance(String fileName, int nbString, int nbChar, int minStrLength, int maxStrLength, long seed) Generates and saves a random instance of the LCSstatic void
-
Constructor Details
-
LCSGenerator
public LCSGenerator()
-
-
Method Details
-
generateRandomInstance
public static void generateRandomInstance(String fileName, int nbString, int nbChar, int minStrLength, int maxStrLength, long seed) throws IOException Generates and saves a random instance of the LCS- Parameters:
fileName- The file to save the instancenbString- How many strings to generate.nbChar- How many characters can be used to generate the string.minStrLength- The inclusive minimal size of the generated strings.maxStrLength- The exclusive maximal size of the generated strings.seed- The seed of the random number generator.- Throws:
IOException- If something goes wrong while writing the file.
-
main
- Throws:
IOException
-