public class SingleSolution extends Solution implements SolutionSolveDef
solve
method.Modifier and Type | Field and Description |
---|---|
protected org.ai_heuristic.eval.metric.MetricDataset |
dataset
The dataset to evaluate
|
protected org.ai_heuristic.functs.Function |
evaluator
Used to evaluate the datasets
|
evaluation, name
Constructor and Description |
---|
SingleSolution(java.lang.String thisName)
Create a new instance of SingleSolution.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Create and return a copy of this solution.
|
org.ai_heuristic.eval.metric.MetricDataset |
getDataset()
Get the stored dataset.
|
void |
setDataset(org.ai_heuristic.eval.metric.MetricDataset thisDataset)
Set the dataset to be evaluated as this solution.
|
void |
setEvaluator(org.ai_heuristic.functs.Function thisEvaluator)
Set the evaluator used to evaluate the datasets.
|
void |
solve(java.util.HashMap<java.lang.String,?> inputVariables)
Calculate the result of this solution over the dataset.
|
getEvaluation, getName, setEvaluation, setName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEvaluation, getName, setEvaluation, setName
protected org.ai_heuristic.functs.Function evaluator
protected org.ai_heuristic.eval.metric.MetricDataset dataset
public SingleSolution(java.lang.String thisName) throws java.lang.Exception
thisName
- the solution name.java.lang.Exception
- any error.public void solve(java.util.HashMap<java.lang.String,?> inputVariables) throws java.lang.Exception
solve
in interface SolutionSolveDef
inputVariables
- an additional set of input variables or constraints. This can be null or empty.
Use setDataset
and setEvaluator
to set the parameters.java.lang.Exception
- any error.public void setEvaluator(org.ai_heuristic.functs.Function thisEvaluator)
thisEvaluator
- the function evaluator.public void setDataset(org.ai_heuristic.eval.metric.MetricDataset thisDataset)
thisDataset
- the dataset to evaluate.public org.ai_heuristic.eval.metric.MetricDataset getDataset()
public java.lang.Object clone()
clone
in class java.lang.Object