Ignore:
Timestamp:
03/25/14 00:15:11 (10 years ago)
Author:
Maciej Komosinski
Message:

Updated sources of the fT (ATGC sequences) genetic operators - useful as an educational example for developers; added genooper_test_fTest.cpp as a demo; removed outdated sources that now have new counterparts

Location:
cpp/frams/genetics/fT
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/fT/oper_fTest.h

    r191 r194  
    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_FTEST_H_
    6 #define _GENO_FTEST_H_
     5#ifndef _GENOOPER_FTEST_H_
     6#define _GENOOPER_FTEST_H_
    77
    8 #include "param.h"
    9 #include "sstring.h"
    10 #include "geno_fx.h"
     8#include "../oper_fx.h"
    119
    1210/** \file */
     
    1614\author Maciej Komosinski
    1715
    18 This is a very simple class to illustrate basic genetic operations.
    19 To compile this code, you may need some GDK files.
    20 For a more sophisticated example of Geno_f4 derived from Geno_fx, refer to
    21 the available source on developmental encoding and f4 genotype format.
     16This is a very simple class that illustrates basic genetic operations performed on ATGC sequences.
     17For a more sophisticated and realistic examples of genetic formats and operators derived from GenoOperators,
     18refer to the available source for genetic formats f9, fF, and f4.
    2219
    2320\sa \ref geno_ftest_example
    24 */     
     21*/
    2522
    26 class Geno_ftest : public Geno_fx
     23class GenoOper_fTest : public GenoOperators
    2724{
    28  public:
    29    Geno_ftest();
    30    int checkValidity(const char *);
    31    int validate(char *&);
    32    int mutate(char *&g,float& chg);
    33    int crossOver(char *&g1,char *&g2,float& chg1,float& chg2);
    34    unsigned long style(const char *g, int pos);
    35    char* getSimplest() {return "GTTCAGATC";}
     25public:
     26        GenoOper_fTest();
     27        int checkValidity(const char *);
     28        int validate(char *&);
     29        int mutate(char *&geno, float& chg, int &method);
     30        int crossOver(char *&g1, char *&g2, float& chg1, float& chg2);
     31        unsigned long style(const char *g, int pos);
     32        const char* getSimplest() { return "GATCGATTACA"; }
    3633
    37    double prob;
     34        double prob;
    3835};
    3936
    4037#endif
    41 
Note: See TracChangeset for help on using the changeset viewer.