Last change
on this file since 961 was
958,
checked in by Maciej Komosinski, 4 years ago
|
Added the fS genetic encoding (for solids)
|
File size:
666 bytes
|
Line | |
---|
1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
---|
2 | // Copyright (C) 2019-2020 Maciej Komosinski and Szymon Ulatowski. |
---|
3 | // See LICENSE.txt for details. |
---|
4 | |
---|
5 | #include "fS_conv.h" |
---|
6 | |
---|
7 | SString GenoConv_fS0::convert(SString &i, MultiMap *map, bool using_checkpoints) |
---|
8 | { |
---|
9 | fS_Genotype *genotype; |
---|
10 | try |
---|
11 | { |
---|
12 | genotype = new fS_Genotype(i.c_str()); |
---|
13 | } |
---|
14 | catch (fS_Exception &e) |
---|
15 | { |
---|
16 | logPrintf("GenoConv_fS0", "convert", LOG_ERROR, e.what()); |
---|
17 | return SString(); |
---|
18 | } |
---|
19 | |
---|
20 | Model model; |
---|
21 | model.open(using_checkpoints); |
---|
22 | genotype->buildModel(model); |
---|
23 | model.close(); |
---|
24 | delete genotype; |
---|
25 | |
---|
26 | if (map) |
---|
27 | { |
---|
28 | model.getCurrentToF0Map(*map); |
---|
29 | } |
---|
30 | |
---|
31 | return model.getF0Geno().getGenes(); |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.