Package es.urjc.etsii.grafo.graphs.model
Class MSTInstanceImporter
java.lang.Object
es.urjc.etsii.grafo.io.InstanceImporter<MSTInstance>
es.urjc.etsii.grafo.graphs.model.MSTInstanceImporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MSTInstance
generateErdosRenyi
(int n, double p, int seed) Generate a Graph using the Erdos-Renyi model.importInstance
(BufferedReader reader, String suggestedName) Load instance from file.Methods inherited from class es.urjc.etsii.grafo.io.InstanceImporter
importInstance
-
Constructor Details
-
MSTInstanceImporter
public MSTInstanceImporter()
-
-
Method Details
-
importInstance
Load instance from file. This method is called by the framework when a new instance is being loaded. Note that instance load time is never considered in the total execution time.- Specified by:
importInstance
in classInstanceImporter<MSTInstance>
- Parameters:
reader
- Input buffer, managed by the framework.suggestedName
- Suggested filename for the instance, can be ignored. By default, the suggested filename is built by removing the path and extension info. For example, for the path "instances/TSP/TSP-1.txt", the suggestedName would be "TSP-1"- Returns:
- immutable instance
- Throws:
IOException
- If an error is encountered while the instance is being parsed
-
generateErdosRenyi
Generate a Graph using the Erdos-Renyi model. Based on NetworkX generators: ...- Returns:
- MSTInstance with a random graph generated using the Erdos-Renyi model
-