net.sourceforge.cilib.problem.mappingproblem
Class CurvilinearDistEvaluator

java.lang.Object
  extended by net.sourceforge.cilib.problem.mappingproblem.CurvilinearDistEvaluator
All Implemented Interfaces:
MappingEvaluator

public class CurvilinearDistEvaluator
extends Object
implements MappingEvaluator

Implements the Curvilinear Distance function for evaluating the fitness of the Mapping problem. (@see MappingProblem}

Author:
jkroon

Constructor Summary
CurvilinearDistEvaluator()
           
 
Method Summary
 Fitness evaluateMapping(Matrix<Double> d)
          Implements the evaluateMapping function as required by.
protected  double f(double o)
          The function F.
 DistanceMetric getDistanceMetric()
          Can be used to retrieve the DistanceMetric to use.
 void setDistanceMetric(DistanceMetric distanceMetric)
          Called by XML factory to set the DistranceMetric to use.
 void setMappingProblem(MappingProblem prob)
          Called by MappingProblem.setEvaluator in order to establisg bi-directional communication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurvilinearDistEvaluator

public CurvilinearDistEvaluator()
Method Detail

evaluateMapping

public Fitness evaluateMapping(Matrix<Double> d)
Implements the evaluateMapping function as required by.

Specified by:
evaluateMapping in interface MappingEvaluator
Parameters:
d - The distrance matrix for the generated output vectors.
Returns:
the fitness as a double, wrapped inside a Fitness.

f

protected double f(double o)
The function F. Well, that is at least the name in the assignment that I'm working on. The only description I've got of this is "Where F is a decreasing function of oij." This is probably another candidate for subclassing.

Parameters:
o - The value to apply the function to.
Returns:
A value that decreases as o increases, never reaching 0.

setMappingProblem

public void setMappingProblem(MappingProblem prob)
Called by MappingProblem.setEvaluator in order to establisg bi-directional communication.

Specified by:
setMappingProblem in interface MappingEvaluator
Parameters:
prob - The instance of MappingProblem that is going use us.

setDistanceMetric

public void setDistanceMetric(DistanceMetric distanceMetric)
Called by XML factory to set the DistranceMetric to use.

Parameters:
distanceMetric - The DistanceMetric to use

getDistanceMetric

public DistanceMetric getDistanceMetric()
Can be used to retrieve the DistanceMetric to use.

Returns:
The DistanceMetric currently in use.


Copyright © 2009 CIRG. All Rights Reserved.