source: cpp/_old/f4/conv_f4.h @ 132

Last change on this file since 132 was 4, checked in by Maciej Komosinski, 16 years ago

added f4, a genetic representation that describes development of an organism

File size: 2.0 KB
Line 
1/**
2 *  conv_f4.h - f4 conversion functions.
3 *
4 *  f4genotype - f4 format genotype conversions for FramSticks
5 *
6 *  Copyright (C) 1999,2000  Adam Rotaru-Varga (adam_rotaru@yahoo.com)
7 *  Copyright (C) 2001-2003  Maciej Komosinski
8 *
9 *  This library is free software; you can redistribute it and/or
10 *  modify it under the terms of the GNU Lesser General Public
11 *  License as published by the Free Software Foundation; either
12 *  version 2.1 of the License, or (at your option) any later version.
13 *
14 *  This library is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 *  Lesser General Public License for more details.
18 *
19 *  You should have received a copy of the GNU Lesser General Public
20 *  License along with this library; if not, write to the Free Software
21 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#ifndef _CONV_F4_H_
26#define _CONV_F4_H_
27
28#include "model.h"
29#include "modelparts.h"
30#include "genoconv.h"
31#include "f4_general.h"
32
33
34// The f4->f0 converter
35class GenoConv_F40: public GenoConverter
36{
37 public:
38  GenoConv_F40();
39  SString convert(SString &in, MultiMap * map);
40};
41
42
43// a test-only f4->f1 converter, approximates only
44class GenoConv_F41_TestOnly: public GenoConverter
45{
46 public:
47  GenoConv_F41_TestOnly();
48  SString convert(SString &in, MultiMap * map);
49};
50
51
52// A Model descendant, which support build from an f4 genotype.
53class f4_Model: public Model
54{
55 public:
56  f4_Model();
57  ~f4_Model();
58  int      buildFromF4(SString &geno);
59  void     toF1Geno(SString &out);       // output to f1 format, approximation
60 private:
61  f4_Cells * cells;
62  int        buildModelRec(f4_Cell * ndad);
63  /**
64   * Get a cell which is a stick, by traversing dadlinks.
65   */
66  f4_Cell *  getStick(f4_Cell * C);
67  int        error;
68  int        errorpos;
69};
70
71
72#endif
73
Note: See TracBrowser for help on using the repository browser.