11 #include "geneorder.h"
12 #include "modelidentifier.h"
13 #include "genesorter.h"
14 #include "sortaction.h"
17 int main(int argc, char** argv){
19 string ann = "default.ann";
22 while ((opt = getopt(argc, argv, "n:h")) != -1) {
28 cout << "Usage: " << argv[0] << " [OPTION] [FILE]" << endl
29 << endl << " -n <ann> Specifies which artificial neural network to use for identification. '" << ann << "' is used by default"
30 << endl << " -h Prints this help message"
32 << "With no FILE, or if FILE is '-', stdin will be used"
37 cerr << "Usage: " << argv[0] << " [-n <ann>] [-h] [FILE]" << endl;
44 if (optind == argc || *argv[optind] == '-'){
47 file.open(argv[optind]);
49 cerr << "Could not open file: '" << argv[optind] << "'" << endl;
56 copy(istream_iterator<int>(*in), istream_iterator<int>(),
58 GeneOrder go(g.begin(),g.end());
61 ModelIdentifier mi(ann);
62 priority_queue<pair<double,Model> > pq = mi.identify(go);
63 while (pq.size() > 0){
64 cout << "Model: " << pq.top().second.name() << " score: " << pq.top().first << endl;
68 //TODO: Chose a sorter
71 GeneSorter::ActionList al = so.sort(go);