Evocosm - A C++ Framework for Evolutionary Computing

Main Index

Created by Scott Robert Ladd at Coyote Gulch Productions.


reproducer.h
1 //---------------------------------------------------------------------
2 // Algorithmic Conjurings @ http://www.coyotegulch.com
3 // Evocosm -- An Object-Oriented Framework for Evolutionary Algorithms
4 //
5 // reproducer.h
6 //---------------------------------------------------------------------
7 //
8 // Copyright 1996, 1999, 2002, 2003, 2004, 2005, 2007 Scott Robert Ladd
9 //
10 // This program is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 2 of the License, or
13 // (at your option) any later version.
14 //
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the
22 // Free Software Foundation, Inc.
23 // 59 Temple Place - Suite 330
24 // Boston, MA 02111-1307, USA.
25 //
26 //-----------------------------------------------------------------------
27 //
28 // For more information on this software package, please visit
29 // Scott's web site, Coyote Gulch Productions, at:
30 //
31 // http://www.coyotegulch.com
32 //
33 //-----------------------------------------------------------------------
34 
35 #if !defined(LIBEVOCOSM_REPRODUCER_H)
36 #define LIBEVOCOSM_REPRODUCER_H
37 
38 // libevocosm
39 #include "organism.h"
40 
41 namespace libevocosm
42 {
44 
53  template <class OrganismType>
54  class reproducer : protected globals
55  {
56  public:
58 
65  virtual ~reproducer()
66  {
67  // nada
68  }
69 
71 
78  virtual vector<OrganismType> breed(const vector<OrganismType> & a_population, size_t a_limit) = 0;
79  };
80 };
81 
82 #endif
Creates new organisms from an existing population.
Definition: reproducer.h:54
virtual ~reproducer()
Virtual destructor.
Definition: reproducer.h:65
A toolkit and framework for implementing evolutionary algorithms.
Definition: evocommon.h:60
Elements shared by all classes in Evocosm.
Definition: evocommon.h:115
virtual vector< OrganismType > breed(const vector< OrganismType > &a_population, size_t a_limit)=0
Creates children.

© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.