net.sourceforge.cilib.problem.mappingproblem
Class LinearMappingProblem

java.lang.Object
  extended by net.sourceforge.cilib.problem.OptimisationProblemAdapter
      extended by net.sourceforge.cilib.problem.mappingproblem.MappingProblem
          extended by net.sourceforge.cilib.problem.mappingproblem.LinearMappingProblem
All Implemented Interfaces:
Serializable, OptimisationProblem, Problem, Cloneable

public class LinearMappingProblem
extends MappingProblem

This class provides an adapter for implementation of NonlinearMapping evaluation functions. The class was written in order to make it easier to write new ways of evaluating how effective a non-linear mapping is, this allows for comparing different methods of evaluation. The reason the mapping is non-linear because it is not reverseable.

Author:
jkroon
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
dataSetBuilder, fitnessEvaluations
 
Constructor Summary
LinearMappingProblem()
           
LinearMappingProblem(LinearMappingProblem copy)
           
 
Method Summary
 DomainRegistry getBehaviouralDomain()
          Returns the domain component that describes the search space of the needed behavioral characteristics of the problem.
 LinearMappingProblem getClone()
          Create a cloned copy of the current object and return it.
 DomainRegistry getDomain()
          Returns the domain component that describes the search space for this problem.
 int getMatrixSize()
          Returns the dimension as required above.
protected  void performMapping(Matrix<Double> input, Vector matrix, Matrix<Double> output)
          This function performs the actual mapping.
 
Methods inherited from class net.sourceforge.cilib.problem.mappingproblem.MappingProblem
calculateFitness, getDistanceInputVect, getInputDim, getNumInputVectors, getOutputDim, setDataSetBuilder, setEvaluator
 
Methods inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
accept, changeEnvironment, getChangeStrategy, getDataSetBuilder, getFitness, getFitnessEvaluations, setChangeStrategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearMappingProblem

public LinearMappingProblem()

LinearMappingProblem

public LinearMappingProblem(LinearMappingProblem copy)
Method Detail

getClone

public LinearMappingProblem getClone()
Description copied from interface: OptimisationProblem
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface OptimisationProblem
Specified by:
getClone in interface Problem
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class OptimisationProblemAdapter
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

performMapping

protected final void performMapping(Matrix<Double> input,
                                    Vector matrix,
                                    Matrix<Double> output)
This function performs the actual mapping. It is only used by this class and should never be required by any of the subclasses, who should only be implementing the evaluateMapping function. The dimension of the input vector (M) must always be greater than the dimension of the output vector (D). This is not checked for as the function will not break should this not hold - it just doesn't make sense. The structure of the matrix is a typical "C" convention, how the data is stored depends on whether you look at the input and output vectors as row or column vectors. In the case of column vectors the indexes into the matrix would go accross with 0 at the top left, (M-1) top-right, M*(D-1) at the bottom left and (M*D-1) at the bottom right. In the case where you are working with row-vectors simply this whole scheme just transposes. In the case of row-vectors this is rowvector * matrix, in the case of column vectors this is matrix * columnvector.

Specified by:
performMapping in class MappingProblem
Parameters:
input - The input vector.
matrix - The matrix to be used for the mapping.
output - The vector into which the output should be placed.

getMatrixSize

public final int getMatrixSize()
Returns the dimension as required above.

Specified by:
getMatrixSize in class MappingProblem
Returns:
The dimension required for the formulae outputs = inputs * matrix.

getDomain

public DomainRegistry getDomain()
Description copied from interface: OptimisationProblem
Returns the domain component that describes the search space for this problem.

Returns:
A DomainRegistry object representing the search space.

getBehaviouralDomain

public DomainRegistry getBehaviouralDomain()
Description copied from interface: OptimisationProblem
Returns the domain component that describes the search space of the needed behavioral characteristics of the problem. This is mainly used for ECs, however, the use of behavioral parameters with PSO will be investigated.

Returns:
The domain of the behavioral component


Copyright © 2009 CIRG. All Rights Reserved.