/*********************************************************************************************
	Description: 将matlab中一些耗时的计算重构为c++实现，各种计算过程的入口

	Copyright : All right reserved by ZheYuan.BJ

	Author : Zhang Zhonghai
	Date : 2023/09/18
***********************************************************************************************/
#include <iostream>
#include <time.h>
#include "common.h"

using namespace std;

/* 程序入口 */
int main(int argc, const char** argv) {
	clock_t begin, finish;
	begin = clock();
	if (argc < 2) {
		cout << "This program take at least 1 arguments(CMD; [Options])!" << endl;
		return 1;
	}

	if (string(argv[1]) == "ProcessPubmedTxt") {
		/* process pubmed txt file */
		ProcessPubmedTxt(argc - 1, argv + 1);
	}
	else if (string(argv[1]) == "CalcEntropy") {
		/* 计算信息熵 */
		cout << "CalcEntropy" << endl;
		CalcEntropy(argc - 1, argv + 1);
	}
	finish = clock();
	cout << argv[1] << " time: " << (double)(finish - begin) / CLOCKS_PER_SEC << " s" << endl;
	return 0;
}
