Package org.ddolib.examples.misp
Class MispGenerator
java.lang.Object
org.ddolib.examples.misp.MispGenerator
Contains methods to generate instances of the MISP.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidgenerateRandom(int nbVars, String fileName, int connectedProba) Generates a random instance of the MISP.static voidgenerateRandom(int nbVars, String fileName, int connectedProba, long seed) Generates a random instance of the MISP.static void
-
Constructor Details
-
MispGenerator
public MispGenerator()
-
-
Method Details
-
generateRandom
public static void generateRandom(int nbVars, String fileName, int connectedProba, long seed) throws IOException Generates a random instance of the MISP.- Parameters:
nbVars- How many nodes in the graph.fileName- The file to save the instance.connectedProba- Each pair of nodes has a probability of1 / connectedProbato not be connected.seed- The seed of the random number generator.- Throws:
IOException- If something goes wrong while writing the file
-
generateRandom
public static void generateRandom(int nbVars, String fileName, int connectedProba) throws IOException Generates a random instance of the MISP.- Parameters:
nbVars- How many nodes in the graph.fileName- The file to save the instance.connectedProba- Each pair of nodes has a probability of1 / connectedProbato not be connected.- Throws:
IOException- If something goes wrong while writing the file
-
main
- Throws:
IOException
-