public class EditDistanceWrapperRTEDRelative extends EditDistanceWrapperRTEDAbsolute
EditDistanceWrapperRTEDAbsolute
and then normalizing the
value to a similarity value (e.g. 1.0 implies equal trees)EditDistanceWrapperRTEDAbsolute.EditDistanceWrapperRTEDAbsoluteGUI
TreeFitnessAbstract.TreeFitnessGUISettingsAbstract<F extends TreeFitnessAbstract>, TreeFitnessAbstract.TreeFitnessGUISettingsEmpty<F extends TreeFitnessAbstract>
Modifier and Type | Field and Description |
---|---|
static TreeFitnessInfo |
info |
baseTrees, beAbsolute, bestTree, lastBestDist, limit
Constructor and Description |
---|
EditDistanceWrapperRTEDRelative(java.util.Collection<NAryTree> base)
Instantiate the edit distance metric with the given set of base trees
|
EditDistanceWrapperRTEDRelative(EditDistanceWrapperRTEDRelative original) |
EditDistanceWrapperRTEDRelative(NAryTree baseTree) |
EditDistanceWrapperRTEDRelative(NAryTree[] base) |
Modifier and Type | Method and Description |
---|---|
double |
getFitness(NAryTree candidate,
java.util.List<? extends NAryTree> population)
Calculates a fitness score for the given candidate.
|
TreeFitnessInfo |
getInfo()
Returns the STATIC info for the metric instance
|
getBestTree, getDistance, getGUISettingsPanel, getLastBestDist, getLimit, resetLimit, setLimit, toLblTree, toLblTree
deepClone, deepClone, instantiateTreeFitness, isNatural
public static final TreeFitnessInfo info
public EditDistanceWrapperRTEDRelative(java.util.Collection<NAryTree> base)
base
- public EditDistanceWrapperRTEDRelative(NAryTree[] base)
public EditDistanceWrapperRTEDRelative(NAryTree baseTree)
public EditDistanceWrapperRTEDRelative(EditDistanceWrapperRTEDRelative original)
public double getFitness(NAryTree candidate, java.util.List<? extends NAryTree> population)
FitnessEvaluator
FitnessEvaluator.isNatural()
). This method must always
return a value greater than or equal to zero. Framework behaviour is
undefined for negative fitness scores.getFitness
in interface FitnessEvaluator<NAryTree>
getFitness
in class EditDistanceWrapperRTEDAbsolute
candidate
- The candidate solution to calculate fitness for.population
- The entire population. This will include the specified
candidate. This is provided for fitness evaluators that
evaluate individuals in the context of the population that
they are part of (e.g. a program that evolves game-playing
strategies may wish to play each strategy against each of the
others). This parameter can be ignored by simple fitness
evaluators. When iterating over the population, a simple
reference equality check (==) can be used to identify which
member of the population is the specified candidate.public TreeFitnessInfo getInfo()
EditDistanceWrapperRTEDAbsolute
getInfo
in class EditDistanceWrapperRTEDAbsolute