Evocosm - A C++ Framework for Evolutionary Computing
Created by Scott Robert Ladd at
Coyote Gulch Productions.
libevocosm::landscape< OrganismType > Class Template Reference
An abstract interface defining a fitness landscape.
More...
#include <landscape.h>
Inheritance diagram for libevocosm::landscape< OrganismType >:
List of all members.Public Member Functions
- landscape (listener &a_listener)
- Constructor.
-
landscape (const landscape &a_source)
- Copy constructor.
-
landscape & operator= (const landscape &a_source)
- Assignment operator.
- virtual ~landscape ()
- Virtual destructor.
- virtual double test (OrganismType &a_organism, bool a_verbose=false) const =0
- Performs fitness testing.
- virtual double test (vector< OrganismType > &a_population) const =0
- Performs fitness testing.
Protected Attributes
Detailed Description
template<class OrganismType>
class libevocosm::landscape< OrganismType >
A "fitness" landscape defines the environment in which an organism competes for survival. A class implementing this interface will test each organism in a list against some criteria. The landscape is tied to the nature of the organism; think of an organism as a potential solution to a problem posed by the landscape.
A floating-point organism, for example, could be tested by a fitness landscape that represents a function to be maximized. Or, an organsism describing the shape of wing could be tested by a landscape implementation that understands airflow.
- Parameters:
-
| OrganismType | - A concrete implementation of the organism template (e.g., the type of organism that "lives" in this landscape) |
Constructor & Destructor Documentation
|
Creates a new landscape object - Parameters:
-
| a_listener | - a listener for events |
|
|
A virtual destructor. By default, it does nothing; this is a placeholder that identifies this class as a potential base, ensuring that objects of a derived class will have their destructors called if they are destroyed through a base-class pointer. |
Member Function Documentation
template<class OrganismType> |
virtual double libevocosm::landscape< OrganismType >::test |
( |
vector< OrganismType > & |
a_population |
) |
const [pure virtual] |
|
|
Tests each chromosome in a_population for fitness. - Parameters:
-
| a_population | - A vector containing organisms to be tested by the landscape. |
- Returns:
- A fitness value for the population as a whole; application-defined.
|
template<class OrganismType> |
virtual double libevocosm::landscape< OrganismType >::test |
( |
OrganismType & |
a_organism, |
|
|
bool |
a_verbose = false |
|
) |
const [pure virtual] |
|
|
Tests a single chromosome for fitness. - Parameters:
-
| a_organism | - The organism to be tested by the landscape. |
| a_verbose | - Display verbose information for test |
- Returns:
- Computed fitness for this organism
|
The documentation for this class was generated from the following file:
© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.