3 #include <CFatalException.h>
9 infile.open(filename.c_str());
12 throw CFatalException(
"No Configurationfile found !");
13 GetData(infile);infile.close();
18 SurfInvGaConfLexer lexer(instream);
19 SurfInvGaConfParser parser(lexer);
21 verbose= parser.verbose;
22 usevrefmodel= parser.usevrefmodel;
23 vrefmodel= parser.vrefmodel;
24 backgroundmodel= parser.backgroundmodel;
25 fitexponent= parser.fitexponent;
26 popsize= parser.popsize;
27 inittemp= parser.inittemp;
28 coolingratio= parser.coolingratio;
29 generations= parser.generations;
30 mutationprob= parser.mutationprob;
31 crossoverprob= parser.crossoverprob;
32 poisson= parser.poisson;
33 threads= parser.threads;
34 errorlevel= parser.errorlevel;
35 gatype= parser.gatype;
36 outputbase= parser.outputbase;
37 inputdata= parser.inputdata;
38 annealinggeneration= parser.annealinggeneration;
39 elitist= parser.elitist;
40 thickbase.assign(parser.thickbase.size(),0);
41 copy(parser.thickbase.begin(),parser.thickbase.end(),thickbase.begin());
42 thickstep.assign(parser.thickstep.size(),0);
43 copy(parser.thickstep.begin(),parser.thickstep.end(),thickstep.begin());
44 thicksizes.assign(parser.thicksizes.size(),0);
45 copy(parser.thicksizes.begin(),parser.thicksizes.end(),thicksizes.begin());
46 svelbase.assign(parser.svelbase.size(),0);
47 copy(parser.svelbase.begin(),parser.svelbase.end(),svelbase.begin());
48 svelstep.assign(parser.svelstep.size(),0);
49 copy(parser.svelstep.begin(),parser.svelstep.end(),svelstep.begin());
50 svelsizes.assign(parser.svelsizes.size(),0);
51 copy(parser.svelsizes.begin(),parser.svelsizes.end(),svelsizes.begin());
52 weights.assign(parser.weights.size(),0);
53 copy(parser.weights.begin(),parser.weights.end(),weights.begin());
58 ofstream confout(filename.c_str());
63 outstream <<
"verbose" <<
"=" ;
64 outstream << (verbose ?
"true" :
"false") << endl;
65 outstream <<
"usevrefmodel" <<
"=" ;
66 outstream << (usevrefmodel ?
"true" :
"false") << endl;
67 outstream <<
"vrefmodel" <<
"=" ;
68 outstream << vrefmodel << endl;
69 outstream <<
"backgroundmodel" <<
"=" ;
70 outstream << backgroundmodel << endl;
71 outstream <<
"fitexponent" <<
"=" ;
72 outstream << fitexponent << endl;
73 outstream <<
"popsize" <<
"=" ;
74 outstream << popsize << endl;
75 outstream <<
"inittemp" <<
"=" ;
76 outstream << inittemp << endl;
77 outstream <<
"coolingratio" <<
"=" ;
78 outstream << coolingratio << endl;
79 outstream <<
"generations" <<
"=" ;
80 outstream << generations << endl;
81 outstream <<
"mutationprob" <<
"=" ;
82 outstream << mutationprob << endl;
83 outstream <<
"crossoverprob" <<
"=" ;
84 outstream << crossoverprob << endl;
85 outstream <<
"poisson" <<
"=" ;
86 outstream << poisson << endl;
87 outstream <<
"threads" <<
"=" ;
88 outstream << threads << endl;
89 outstream <<
"errorlevel" <<
"=" ;
90 outstream << errorlevel << endl;
91 outstream <<
"gatype" <<
"=" ;
92 outstream << gatype << endl;
93 outstream <<
"outputbase" <<
"=" ;
94 outstream << outputbase << endl;
95 outstream <<
"inputdata" <<
"=" ;
96 outstream << inputdata << endl;
97 outstream <<
"annealinggeneration" <<
"=" ;
98 outstream << annealinggeneration << endl;
99 outstream <<
"elitist" <<
"=" ;
100 outstream << (elitist ?
"true" :
"false") << endl;
101 outstream <<
"thickbase" <<
"=" ;
102 for (
size_t i = 0; i < thickbase.size(); ++i)
103 outstream << thickbase.at(i) <<
" ";
106 outstream <<
"thickstep" <<
"=" ;
107 for (
size_t i = 0; i < thickstep.size(); ++i)
108 outstream << thickstep.at(i) <<
" ";
111 outstream <<
"thicksizes" <<
"=" ;
112 for (
size_t i = 0; i < thicksizes.size(); ++i)
113 outstream << thicksizes.at(i) <<
" ";
116 outstream <<
"svelbase" <<
"=" ;
117 for (
size_t i = 0; i < svelbase.size(); ++i)
118 outstream << svelbase.at(i) <<
" ";
121 outstream <<
"svelstep" <<
"=" ;
122 for (
size_t i = 0; i < svelstep.size(); ++i)
123 outstream << svelstep.at(i) <<
" ";
126 outstream <<
"svelsizes" <<
"=" ;
127 for (
size_t i = 0; i < svelsizes.size(); ++i)
128 outstream << svelsizes.at(i) <<
" ";
131 outstream <<
"weights" <<
"=" ;
132 for (
size_t i = 0; i < weights.size(); ++i)
133 outstream << weights.at(i) <<
" ";
void GetData(std::ifstream &instream)
void WriteData(std::ofstream &outstream)