source: cpp/frams/genetics/f4/conv_f4.h @ 736

Last change on this file since 736 was 736, checked in by Maciej Komosinski, 2 years ago

Added the new "using_checkpoints" argument to genetic converters so they can now call Model.checkpoint() when desired, see conv_f1.cpp for an example

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5// Copyright (C) 1999,2000  Adam Rotaru-Varga (adam_rotaru@yahoo.com), GNU LGPL
6// Copyright (C) since 2001 Maciej Komosinski
7
8#ifndef _CONV_F4_H_
9#define _CONV_F4_H_
10
11#include <frams/model/model.h>
12#include <frams/model/modelparts.h>
13#include <frams/genetics/genoconv.h>
14#include "f4_general.h"
15
16
17// The f4->f0 converter
18class GenoConv_f40 : public GenoConverter
19{
20public:
21        GenoConv_f40();
22        SString convert(SString &in, MultiMap * map, bool using_checkpoints);
23};
24
25
26// a test-only f4->f1 converter, approximates only
27class GenoConv_F41_TestOnly : public GenoConverter
28{
29public:
30        GenoConv_F41_TestOnly();
31        SString convert(SString &in, MultiMap * map, bool using_checkpoints);
32};
33
34
35// A Model descendant, which support build from an f4 genotype.
36class f4_Model : public Model
37{
38public:
39        f4_Model();
40        ~f4_Model();
41        int      buildFromF4(SString &geno);
42        void     toF1Geno(SString &out);       // output to f1 format, approximation
43private:
44        f4_Cells * cells;
45        int        buildModelRec(f4_Cell * ndad);
46        /**
47         * Get a cell which is a stick, by traversing dadlinks.
48         */
49        f4_Cell *  getStick(f4_Cell * C);
50        int        error;
51        int        errorpos;
52};
53
54
55#endif
Note: See TracBrowser for help on using the repository browser.