Class LCSGenerator

java.lang.Object
org.ddolib.examples.lcs.LCSGenerator

public class LCSGenerator extends Object
Contains method to generate instances of the LCS
  • 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 instance
      nbString - 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

      public static void main(String[] args) throws IOException
      Throws:
      IOException