The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
enviroment::cObjectFitnessAlgorithm Class Reference

#include <cObjectFitnessAlgorithm.h>

Inheritance diagram for enviroment::cObjectFitnessAlgorithm:
Collaboration diagram for enviroment::cObjectFitnessAlgorithm:

List of all members.

Public Member Functions

 cObjectFitnessAlgorithm ()
 cObjectFitnessAlgorithm (cIndividual *pInOriginalIndividual)
 cObjectFitnessAlgorithm (const cObjectFitnessAlgorithm &objectFitnessAlgorithm)
virtual ~cObjectFitnessAlgorithm ()=0
virtual cObjectFitnessevalueFitness (const cIndividual &individual) const =0
virtual string getClassName () const
virtual bool setOriginalIndividual (cIndividual *pInOriginalIndividual)
cIndividualgetOriginalIndividual ()
const cIndividualgetOriginalIndividual () const
virtual cObjectFitnessAlgorithmclone () const =0
virtual const cObjectFitnessgetBestFitness () const =0
virtual const cObjectFitnessgetWorstCaseFitness () const =0

Protected Attributes

cIndividualpOriginalIndividual
pthread_mutex_t mutexOriginalIndividual

Detailed Description

Definition at line 59 of file cObjectFitnessAlgorithm.h.


Constructor & Destructor Documentation

enviroment::cObjectFitnessAlgorithm::cObjectFitnessAlgorithm ( )

constructor

enviroment::cObjectFitnessAlgorithm::cObjectFitnessAlgorithm ( cIndividual pInOriginalIndividual)

constructor

Parameters:
pInOriginalIndividualthe individual with which the fitness should be evalued; Beware: this object won't be copied, so don't delete it as long as this object exists
enviroment::cObjectFitnessAlgorithm::cObjectFitnessAlgorithm ( const cObjectFitnessAlgorithm objectFitnessAlgorithm)

copyconstructor

Parameters:
objectFitnessAlgorithmthe cObjectFitnessAlgorithm object to copy
virtual enviroment::cObjectFitnessAlgorithm::~cObjectFitnessAlgorithm ( )
pure virtual

Destructor of the class cObjectFitnessAlgorithm.


Member Function Documentation

virtual cObjectFitnessAlgorithm* enviroment::cObjectFitnessAlgorithm::clone ( ) const
pure virtual

This Method clones this object.

Returns:
a clone of this object

Implemented in enviroment::fib::cFibObjectFitnessAlgorithm, and enviroment::fib::cFibObjectFitnessBasicAlgorithm.

virtual cObjectFitness* enviroment::cObjectFitnessAlgorithm::evalueFitness ( const cIndividual individual) const
pure virtual

This function evalues the fitness for the given individual. Beware: You have to delete the returned fitness after usage.

See also:
pOriginalIndividual
Parameters:
individualthe cIndividual for which a fitnessobject should be created
Returns:
a pointer to a fitnessobject for the fitness of the given individual or NULL, if no fitness could be created

Implemented in enviroment::fib::cFibObjectFitnessBasicAlgorithm.

virtual const cObjectFitness* enviroment::cObjectFitnessAlgorithm::getBestFitness ( ) const
pure virtual

This Method returns the best possible fitness the algorithm can create. No individual with a better/ higher fitness can be created with this algorithm. Normaly this would be an indivudual which represents the original individual perfectly and don't use recources. If no best possible fitness can be evalued NULL is returned.

Returns:
a refernce to the best possible fitness or NULL, if non can be creted

Implemented in enviroment::fib::cFibObjectFitnessAlgorithm, and enviroment::fib::cFibObjectFitnessBasicAlgorithm.

virtual string enviroment::cObjectFitnessAlgorithm::getClassName ( ) const
virtual
cIndividual* enviroment::cObjectFitnessAlgorithm::getOriginalIndividual ( )
See also:
setOriginalIndividual()
pOriginalIndividual
Returns:
a pointer to the originalindividual or NULL if non exists The originalindividual is the individual with which the fitness is evalued.

Reimplemented in enviroment::fib::cFibObjectFitnessAlgorithm.

const cIndividual* enviroment::cObjectFitnessAlgorithm::getOriginalIndividual ( ) const
See also:
setOriginalIndividual()
pOriginalIndividual
Returns:
a pointer to the originalindividual or NULL if non exists The originalindividual is the individual with which the fitness is evalued.
virtual const cObjectFitness* enviroment::cObjectFitnessAlgorithm::getWorstCaseFitness ( ) const
pure virtual

This Method returns the worst case fitness for the algorithm and originalindividual. An individual with the worst case fitness can easyly be created. Normaly this would be the fitness of the originalindividual. If no worst case fitness can be evalued NULL is returned.

Returns:
a refernce to the worst case fitness or NULL, if non can be created

Implemented in enviroment::fib::cFibObjectFitnessAlgorithm, and enviroment::fib::cFibObjectFitnessBasicAlgorithm.

virtual bool enviroment::cObjectFitnessAlgorithm::setOriginalIndividual ( cIndividual pInOriginalIndividual)
virtual

This method sets the originalindividual. The originalindividual is the individual with which the fitness should be evalued.

See also:
getOriginalIndividual()
pOriginalIndividual
Parameters:
pInOriginalIndividuala point to the originalindividual to set Beware: this object won't be copied, so don't delete it as long as this object exists
Returns:
true if the originalindividual is set to originalIndividum, else false

Reimplemented in enviroment::fib::cFibObjectFitnessBasicAlgorithm, and enviroment::fib::cFibObjectFitnessAlgorithm.


Member Data Documentation

pthread_mutex_t enviroment::cObjectFitnessAlgorithm::mutexOriginalIndividual
mutableprotected

Definition at line 74 of file cObjectFitnessAlgorithm.h.

cIndividual* enviroment::cObjectFitnessAlgorithm::pOriginalIndividual
protected

The individual with which the fitness should be evalued. The more similar the given individual is to this (originalIndividual) the higher its fitness will be, if it's other properties (e.g. size) are the same.

Definition at line 69 of file cObjectFitnessAlgorithm.h.


The documentation for this class was generated from the following file: