|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.cilib.problem.OptimisationProblemAdapter
net.sourceforge.cilib.problem.mappingproblem.MappingProblem
public abstract class MappingProblem
Abstract MappingProblem class that allows for implementing methods of mapping high-dimensional data onto lower dimensions. This class is abstract and merely provides a nice skeleton, similar to the OptimisationProblemAdapter.
| Field Summary |
|---|
| Fields inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter |
|---|
dataSetBuilder, fitnessEvaluations |
| Constructor Summary | |
|---|---|
MappingProblem()
|
|
| Method Summary | |
|---|---|
protected Fitness |
calculateFitness(Type solution)
Calculates the fitness of the given matrix. |
double |
getDistanceInputVect(int i1,
int i2)
Retrieve the distance between the two given input vectors. |
int |
getInputDim()
Gets the value of M, the input dimension. |
protected abstract int |
getMatrixSize()
This function should return the number of "doubles" required in the matrix in order to perform the mapping. |
protected int |
getNumInputVectors()
This function retrieves the number of input vectors that forms part of the dataset. |
int |
getOutputDim()
Gets the value of D, the output dimension. |
protected abstract void |
performMapping(Matrix<Double> inputs,
Vector distmatrix,
Matrix<Double> outputs)
This function is there to perform the mapping. |
void |
setDataSetBuilder(DataSetBuilder dataSetBuilder)
This method is used during initialisation by the Simulator to provide us with out DataSet. |
void |
setEvaluator(MappingEvaluator evaluator)
This function sets the evaluator to use. |
| Methods inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter |
|---|
accept, changeEnvironment, getChangeStrategy, getClone, getDataSetBuilder, getFitness, getFitnessEvaluations, setChangeStrategy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sourceforge.cilib.problem.OptimisationProblem |
|---|
getBehaviouralDomain, getDomain |
| Constructor Detail |
|---|
public MappingProblem()
| Method Detail |
|---|
protected final Fitness calculateFitness(Type solution)
evaluateMapping function. It may call evaluateMapping multiple
times for every call to calculateFitness depending on the dataset.
calculateFitness in class OptimisationProblemAdaptersolution - The solution to evaluate. This must conform to the
domain.
Fitness of the solution in the current Problem.OptimisationProblemAdapter.getFitness(Type, boolean)
protected abstract void performMapping(Matrix<Double> inputs,
Vector distmatrix,
Matrix<Double> outputs)
inputs - The input vectors - do not alter.distmatrix - The matrix as supplied by the Algorithm - do not alter.outputs - Place your resulting output vectors in here.protected abstract int getMatrixSize()
public final int getInputDim()
public final int getOutputDim()
protected final int getNumInputVectors()
public final void setEvaluator(MappingEvaluator evaluator)
The - evaluator to use.public void setDataSetBuilder(DataSetBuilder dataSetBuilder)
setDataSetBuilder in interface OptimisationProblemsetDataSetBuilder in class OptimisationProblemAdapterdataset - The dataset from which to retrieve the data.
public final double getDistanceInputVect(int i1,
int i2)
i1 - Index of the first vectori2 - Index of the second vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||