net.sourceforge.cilib.problem.mappingproblem
Interface DistanceMetric

All Known Implementing Classes:
LinearDistanceMetric

public interface DistanceMetric

Represents a method for calculating the structure distance between two vectors in a MappingProblem.

Author:
jkroon

Method Summary
 double getDistance(int i, int j)
          Gets called by CurvilinearDistEvaluator to request the distance between two vectors to be returned.
 void setMappingProblem(MappingProblem prob)
          Gets called by CurvilinearDistEvaluator to indicate the precice problem to make use of.
 

Method Detail

setMappingProblem

void setMappingProblem(MappingProblem prob)
Gets called by CurvilinearDistEvaluator to indicate the precice problem to make use of. It is recommended that the results of the distances be calculated and placed into some kind of matrix at this point to allow for faster execution.

Parameters:
prob - The underlying MappingProblem.

getDistance

double getDistance(int i,
                   int j)
Gets called by CurvilinearDistEvaluator to request the distance between two vectors to be returned.

Parameters:
i - The index of the "from" vector.
j - The index of the "to" vector.
Returns:
The distance between to two vectors.


Copyright © 2009 CIRG. All Rights Reserved.