Skip to content

Commit

Permalink
commandline support
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad88me committed Mar 24, 2020
1 parent 2574486 commit a37d0b7
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
#include<iostream>
#include<string>
#include "t2dv2.h"

using namespace std;

int main(){
cout<< "Hello World!"<<endl;
int main(int argc, char* argv[]) {
long k;
string hdt_file, classes_file, files_dir, log_file="main.log";
if(argc<4) {
cerr << "Usage: " << argv[0] << "hdt_file classes_file files_dir " << std::endl;
}
else {
hdt_file = argv[1];
classes_file = argv[2];
files_dir = argv[3];
T2Dv2* t2d = new T2Dv2(hdt_file, log_file, classes_file, files_dir);
t2d->run_test(0.0, 1.0, 0.05);
k=0;
cout << "====> K = " <<k+1<<endl;
t2d->compute_scores(k);
k+=2;
cout << "====> K = " <<k+1<<endl;
t2d->compute_scores(k);
k+=2;
cout << "====> K = " <<k+1<<endl;
t2d->compute_scores(k);
}
return 0;
}

0 comments on commit a37d0b7

Please sign in to comment.