propclass/evolve.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2007 by Jorrit Tyberghein 00004 00005 Genetic Algorithm Property Class 00006 Copyright (C) 2007 by Mat Sutcliffe 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with this library; if not, write to the Free 00020 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 #ifndef __CEL_PF_EVOLVE__ 00024 #define __CEL_PF_EVOLVE__ 00025 00026 #include "cstypes.h" 00027 #include "csutil/scf.h" 00028 #include "csutil/refcount.h" 00029 #include "csutil/array.h" 00030 00031 #include "physicallayer/datatype.h" 00032 00061 struct iPcEvolve : public virtual iBase 00062 { 00063 SCF_INTERFACE(iPcEvolve, 0, 0, 1); 00064 00068 virtual void SetPopulationSize(size_t size) = 0; 00069 00073 virtual size_t GetPopulationSize() const = 0; 00074 00079 virtual void SetSubject(iCelPropertyClass *pc) = 0; 00080 00085 virtual iCelPropertyClass* GetSubject() = 0; 00086 00098 virtual void SetProbabilities(float select, float mutate) = 0; 00099 00105 virtual void Generate() = 0; 00106 00112 virtual void FitnessCallback(float fitness) = 0; 00113 00120 virtual float GetFitness(size_t index) const = 0; 00121 00128 virtual void SelectGenome(size_t index) = 0; 00129 00134 virtual void ResetPopulation() = 0; 00135 }; 00136 00137 #endif // __CEL_PF_EVOLVE__ 00138
Generated for CEL: Crystal Entity Layer 2.0 by doxygen 1.6.1
