public class Main
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.List<Algorithm> |
algorithms
List of algorithms to evaluate.
|
private static int |
DATASET_SIZE
Number of graphs in a data set.
|
private static int |
LABELS
Number of labels to use for the data set.
|
private static java.nio.file.Path |
LOGS
Directory to store runtime logs in.
|
private static int |
MAX_RULES
Maximum number of rule applications to use to generate a data set.
|
private static long |
MAX_RUNTIME
The maximum amount of time in nanoseconds that an algorithm is allowed
to spend evaluating a complete data set.
|
private static int |
MIN_RULES
Number of rule applications to use to generate the initial data set.
|
static java.lang.String |
PYTHON_COMMAND
Command to start a Python process on the host system.
|
private static int |
RULE_GROWTH_FACTOR
Increase in data set size after an algorithm processes a data set
within the set time limit.
|
private static int |
SEED
Random seed to use to generate data sets.
|
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
private static EvaluationResults |
evaluateAlgorithm(Algorithm algo)
Evaluates the given algorithm on randomly generated CPQs.
|
private static java.lang.String |
findPython()
Finds a Python 3 installation on the host system.
|
private static void |
loadNatives()
Loads the compiled JNI libraries required for certain algorithm implementations.
|
static void |
main(java.lang.String[] args)
Starts the algorithm evaluation process.
|
private static final java.nio.file.Path LOGS
private static final long MAX_RUNTIME
private static final int DATASET_SIZE
private static final int MIN_RULES
private static final int MAX_RULES
private static final int RULE_GROWTH_FACTOR
private static final int LABELS
private static final int SEED
public static final java.lang.String PYTHON_COMMAND
public static final java.util.List<Algorithm> algorithms
public static void main(java.lang.String[] args)
args
- No valid command line arguments.private static final EvaluationResults evaluateAlgorithm(Algorithm algo)
MIN_RULES
and go up to at most MAX_RULES
at a rate of RULE_GROWTH_FACTOR
.
Each dataset will contain DATASET_SIZE
CPQs and at most LABELS
labels will be used in the CPQs. Each dataset will need to be processed by the
algorithm in MAX_RUNTIME
nanoseconds. If the algorithm needs more time
it will not be given a larger dataset next effectively ending the evaluation.
The value for SEED
will be used to generate the random dataset. All
tasks will be executed on a single thread.algo
- The algorithm to evaluate.GraphDataSet
,
Algorithm
,
ReportSummaryStatistics
,
RuntimeReport
,
EvaluationResults
private static final void loadNatives() throws java.io.IOException, java.lang.UnsatisfiedLinkError
java.io.IOException
- When an IOException occurs.java.lang.UnsatisfiedLinkError
- When loading a native library fails.private static final java.lang.String findPython()
python3
command unless an
anaconda 3 installation is detected.