Ignore:
Timestamp:
02/08/14 06:00:41 (10 years ago)
Author:
sz
Message:

updated file headers and makefiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/oper_fx.h

    r119 r121  
    1 // This file is a part of the Framsticks GenoFX library.
    2 // Copyright (C) 2002-2011  Maciej Komosinski.  See LICENSE.txt for details.
     1// This file is a part of the Framsticks GDK.
     2// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
    33// Refer to http://www.framsticks.com/ for further information.
    44
    5 #ifndef _GENO_FX_H_
    6 #define _GENO_FX_H_
     5#ifndef _GENO_OPERATORS_H_
     6#define _GENO_OPERATORS_H_
    77
    88#include <common/nonstd.h>
     
    4949
    5050When designing genetic operations on some representation, inherit your class
    51 (for example Geno_fMy) from Geno_fx. Define some methods,
     51(for example GenoOper_fMy) from GenoOperators. Define some methods,
    5252like mutate(), in your class, to allow for evolution.
    5353Ensure they have the same names and arguments as the corresponding
     
    7777the available source on developmental encoding and f4 genotype format.*/
    7878
    79 class Geno_fx
     79class GenoOperators
    8080{
    8181 public:
     
    8484   SString name; ///<name of this set of genetic operators
    8585   char **mutation_method_names; ///<array of names for mutation methods. If initialized (by new char*[]), must have entries for each method index returned by mutate(geno,chg,METHOD).  If initialized, it is automatically freed by this destructor.
    86    Geno_fx() : par(empty_paramtab) {supported_format='x'; name="Default"; mutation_method_names=NULL; setDefaults();}
     86   GenoOperators() : par(empty_paramtab) {supported_format='x'; name="Default"; mutation_method_names=NULL; setDefaults();}
    8787
    8888/**Used to perform initializations of Param parameters that are not handled by the Param itself
     
    172172///currently not used (similarity of two genotypes)
    173173   virtual float similarity(const char*,const char*) {return GENOPER_NOOPER;}
    174    virtual ~Geno_fx() {if (mutation_method_names) {delete []mutation_method_names; mutation_method_names=NULL;}}
     174   virtual ~GenoOperators() {if (mutation_method_names) {delete []mutation_method_names; mutation_method_names=NULL;}}
    175175//   virtual char getFormat() {return 255;} //returns supported genotype format, for ex. '1'
    176176//   virtual int enabled() {return 1;} // should be enabled by default
     
    178178/** \name Some helpful methods for you */
    179179//@{
    180         static int roulette(const double *probtab,const int count);    ///<returns random index according to probabilities in the \e probtab table or -1 if all probs are zero. \e count is the number of elements in \e probtab.
     180  static int roulette(const double *probtab,const int count);  ///<returns random index according to probabilities in the \e probtab table or -1 if all probs are zero. \e count is the number of elements in \e probtab.
    181181   static bool getMinMaxDef(ParamInterface *p,int propindex,double &mn,double &mx,double &def); ///<perhaps a more useful (higher-level) way to obtain min/max/def info for integer and double properties. Returns true if min/max/def was really available (otherwise it is just invented).
    182182   static int selectRandomProperty(Neuro* n); ///<selects random property (either 0-based extraproperty of Neuro or 100-based property of its NeuroClass). -1 if Neuro has no properties.
     
    194194   static void skipWS(char *&s); ///<advances pointer \e s skipping whitespaces.
    195195   static bool areAlike(char*,char*); ///<compares two text strings skipping whitespaces. Returns 1 when equal, 0 when different.
    196          static char* strchrn0(const char *str,char ch); ///<like strchr, but does not find zero char in \e str.
     196   static char* strchrn0(const char *str,char ch); ///<like strchr, but does not find zero char in \e str.
    197197   static bool isNeuroClassName(const char firstchar); ///<determines if \e firstchar may start NeuroClass name. If not, it may start NeuroClass' (or Neuro's) property name.
    198198//@}
     
    216216
    217217#endif
    218 
Note: See TracChangeset for help on using the changeset viewer.