11 #include "geneorder.h"
12 #include "modelidentifier.h"
13 #include "genesorter.h"
14 #include "sortaction.h"
16 typedef pair<ModelIdentifier::Model,double> modelpair;
18 int main(int argc, char** argv){
20 string ann = "default.ann";
23 while ((opt = getopt(argc, argv, "n:h")) != -1) {
29 cout << "Usage: " << argv[0] << " [OPTION] [FILE]" << endl
30 << endl << " -n <ann> Specifies which artificial neural network to use for identification. '" << ann << "' is used by default"
31 << endl << " -h Prints this help message"
33 << "With no FILE, or if FILE is '-', stdin will be used"
38 cerr << "Usage: " << argv[0] << " [-n <ann>] [-h] [FILE]" << endl;
45 if (optind == argc || *argv[optind] == '-'){
48 file.open(argv[optind]);
50 cerr << "Could not open file: '" << argv[optind] << "'" << endl;
57 copy(istream_iterator<int>(*in), istream_iterator<int>(),
59 GeneOrder go(g.begin(),g.end());
62 ModelIdentifier mi(ann);
63 map<ModelIdentifier::Model,double> scores = mi.identify(go);
64 for (map<ModelIdentifier::Model,double>::iterator m = scores.begin();
65 m != scores.end(); ++m){
66 cout << "Model: " << m->first << " score: " << m->second << endl;
69 //TODO: Chose a sorter
72 GeneSorter::ActionList al = so.sort(go);