Changeset 196 for cpp/frams/genetics/f4/conv_f4.h
- Timestamp:
- 03/25/14 03:22:37 (10 years ago)
- Location:
- cpp/frams/genetics/f4
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f4/conv_f4.h
r193 r196 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 */ 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. 3 // Refer to http://www.framsticks.com/ for further information. 4 5 // Copyright (C) 1999,2000 Adam Rotaru-Varga (adam_rotaru@yahoo.com), GNU LGPL 6 // Copyright (C) since 2001 Maciej Komosinski 24 7 25 8 #ifndef _CONV_F4_H_ 26 9 #define _CONV_F4_H_ 27 10 28 #include "model.h"29 #include "modelparts.h"30 #include "genoconv.h"11 #include <frams/model/model.h> 12 #include <frams/model/modelparts.h> 13 #include <frams/genetics/genoconv.h> 31 14 #include "f4_general.h" 32 15 33 16 34 17 // The f4->f0 converter 35 class GenoConv_ F40: public GenoConverter18 class GenoConv_f40 : public GenoConverter 36 19 { 37 38 GenoConv_F40();39 20 public: 21 GenoConv_f40(); 22 SString convert(SString &in, MultiMap * map); 40 23 }; 41 24 42 25 43 26 // a test-only f4->f1 converter, approximates only 44 class GenoConv_F41_TestOnly : public GenoConverter27 class GenoConv_F41_TestOnly : public GenoConverter 45 28 { 46 47 48 29 public: 30 GenoConv_F41_TestOnly(); 31 SString convert(SString &in, MultiMap * map); 49 32 }; 50 33 51 34 52 35 // A Model descendant, which support build from an f4 genotype. 53 class f4_Model : public Model36 class f4_Model : public Model 54 37 { 55 56 57 58 59 60 61 62 63 64 65 66 67 68 38 public: 39 f4_Model(); 40 ~f4_Model(); 41 int buildFromF4(SString &geno); 42 void toF1Geno(SString &out); // output to f1 format, approximation 43 private: 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; 69 52 }; 70 53 71 54 72 55 #endif 73
Note: See TracChangeset
for help on using the changeset viewer.