16 #include <sys/timeb.h>
19 int main(
int argc,
char ** argv )
29 for(
int i = 1; i < argc; i++){
34 vector<string> fields =
GDB::split(
" -", argList);
37 map<string, string> argments;
38 for(
int i = 0; i < fields.size(); i++)
41 int pos = fields[i].find_first_of(
' ');
42 temp.push_back( fields[i].substr(0,pos) );
43 temp.push_back( fields[i].substr(pos+1,fields[i].length()-pos-1 ));
46 vector<string>::iterator it = find(sparta.argList.begin(), sparta.argList.end(), temp[0]);
47 if( it == sparta.argList.end() )
49 cerr <<
"Invaid arg name -" << temp[0] << endl;
53 if( temp[0] ==
"oldsparta" ) arg =
"true";
54 else if( temp[0] ==
"notime" ) time =
false;
56 argments[ temp[0] ] = arg;
60 clock_t
start, finish;
63 sparta.setArgs(argments);
65 if( argments[
"oldsparta"].length() > 0 )
67 else if( argments[
"ins"].length() > 0 )
68 sparta.runANN_Predictions();
70 sparta.runANN_Prediction();
74 cout <<
"\tRunning time: " << (float)(finish - start)/ CLOCKS_PER_SEC <<
" seconds" << endl;