Mercurial > hg > gpsynth
comparison src/program_options.hpp @ 0:add35537fdbb tip
Initial import
author | irh <ian.r.hobson@gmail.com> |
---|---|
date | Thu, 25 Aug 2011 11:05:55 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:add35537fdbb |
---|---|
1 // Copyright 2011, Ian Hobson. | |
2 // | |
3 // This file is part of gpsynth. | |
4 // | |
5 // gpsynth is free software: you can redistribute it and/or modify | |
6 // it under the terms of the GNU General Public License as published by | |
7 // the Free Software Foundation, either version 3 of the License, or | |
8 // (at your option) any later version. | |
9 // | |
10 // gpsynth is distributed in the hope that it will be useful, | |
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 // GNU General Public License for more details. | |
14 // | |
15 // You should have received a copy of the GNU General Public License | |
16 // along with gpsynth in the file COPYING. | |
17 // If not, see http://www.gnu.org/licenses/. | |
18 | |
19 // command line options handler | |
20 | |
21 #pragma once | |
22 | |
23 #include <string> | |
24 | |
25 struct ProgramOptions { | |
26 std::string target_path_; | |
27 std::string grammar_path_; | |
28 std::string sc_app_path_; | |
29 std::string work_folder_; | |
30 std::string fitness_features_; | |
31 std::size_t population_size_; | |
32 std::size_t generations_; | |
33 std::size_t tournament_size_; | |
34 double fitness_threshold_; | |
35 double crossover_rate_; | |
36 double mutation_rate_; | |
37 bool reproduce_best_individual_; | |
38 std::size_t analysis_window_size_; | |
39 std::size_t analysis_hop_size_; | |
40 std::size_t maximum_tree_depth_; | |
41 bool keep_temp_folders_; | |
42 std::size_t core_limit_; | |
43 }; | |
44 | |
45 void ParseCommandLine(int argument_count, | |
46 const char* arguments[], | |
47 ProgramOptions* options); |