Creating an IFitnessCase Subclass

Sub-class Specific Functions - Important

Because subclasses of IFitnessMeasure are responsible for tracking and updating a measure of fitness these subclasses must have access to the relevant information about what the correct register values are for a given fitness case.

A subclass of IFitnessCase must make this information available so that IFitnessMeasure::UpdateError can update the error. This can be done in a number of ways - for example, the subclass may have a method which returns the index of what should be the largest register, or it might return the specific value(s) for some of the registers and rely on the subclass of IFitnessMeasure to know to which registers those values apply. This thus represents some of the tightest coupling in VUWLGP and the designs of the IFitnessCase and IFitnessMeasure subclasses should be considered together.


F

This function returns the i'th feature. It should not need to be modified or considered if VUWLGP is being applied to a feature based problem.


Generate(std::string patternFileLine)

This method probably should be implemented for each subclass of IFitnessCase. It is used to generate a fitness case in a factory-type manner, so that the other classes which use the subclasses of IFitnessCase can generate fitness cases without knowing the name of the class internally, as this name will be specified as a template paramter.


MakeAbstract

This method does not do anything and should probably just be instantiated as an empty method or one which throws an exception if called. It exists purely to make sure the base-class (IFitnessCase) is abstract.



Christopher Fogelberg
fogelbchri@mcs.vuw.ac.nz or cgf.unimail@syntilect.com