本文整理汇总了C++中Timing::outtime方法的典型用法代码示例。如果您正苦于以下问题:C++ Timing::outtime方法的具体用法?C++ Timing::outtime怎么用?C++ Timing::outtime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timing
的用法示例。
在下文中一共展示了Timing::outtime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
char* myString;
int* suffixArray;
int stringLength;
int i;
ifstream inFile;
inFile.open(argv[1]);
Timing timehere;
if (strcmp(argv[1], "test.dat") != 0)
{
timehere.markbeg();
if (strstr(argv[1], ".fas")[0] == '.')
{
read_fasta(inFile, myString, stringLength);
}
else
{
read_input(inFile, myString, stringLength);
}
timehere.markend();
inFile.close();
cout << "finish read "
<< stringLength << " characters."<< endl;
timehere.outtime();
}
else
{
read_input(inFile, myString, stringLength);
inFile.close();
cout << "finish read "
<< stringLength << " characters."<< endl;
}
timehere.markbeg();
suffixArray = LinearSuffixSort(myString, stringLength);
timehere.markend();
timehere.outtime("finish suffix sort,");
if (strcmp(argv[1], "test.dat") == 0)
{
int result;
bool pass = true;
ifstream resultF;
resultF.open("result.test.dat");
cout << "Testing the Suffix Array" << endl;
for (i = 0; i < stringLength; i++)
{
resultF >> result;
if (result != suffixArray[i])
{
pass = false;
}
}
if (pass == false)
{
cout << endl;
cout << "***************" << endl;
cout << "test has failed" << endl;
cout << "***************" << endl;
}
else
{
cout << endl;
cout << "******************" << endl;
cout << "test is successful" << endl;
cout << "******************" << endl;
}
}
示例2: main
//.........这里部分代码省略.........
//Program : BGF
//Version : 2.1.2
//Time : Wed Nov 22 20:53:23 2006
if (ishtml)
printf("<html>\n<head>\n<title>LTR_FINDER Result</title>\n</head>\n<body>\n<pre>\n");
printf("Program : LTR_FINDER\n");
printf("Version : %s\n\n", version);
const char *id_filter_stat;
re_syntax_options = RE_SYNTAX_POSIX_EGREP |
RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL;
id_filter_stat = re_compile_pattern(namePattern.c_str(),
namePattern.length(), &id_filter);
if (id_filter_stat != NULL)
{
printf("not a vaild POSIX regex after -P, code = %s\n", id_filter_stat);
}
if (tRNA_file != NULL)
{
timehere.markbeg();
string tmp_out = "Load tRNA db [";
tmp_out += tRNA_file;
tmp_out += "] ";
pbs.LoadSeq(tRNA_file);
timehere.markend ();
timehere.outtime(tmp_out.c_str());
}
ps_scan.init(ps_dir);
set_score_matrix(gap_open, gap_ext, gap_end, score_match, score_mismatch);
FILE * inFASTA = fopen(argv[optind], "r");
if (inFASTA == NULL)
{
cerr << "open " << argv[optind] << " error!" << endl;
exit(1);
}
//init transDNA
for(int i=0;i<128;++i)
transDNA[i]='N';
transDNA['a']='A';
transDNA['A']='A';
transDNA['c']='C';
transDNA['C']='C';
transDNA['g']='G';
transDNA['G']='G';
transDNA['t']='T';
transDNA['T']='T';
transDNA['u']='T';
transDNA['U']='T';
seq_t sequence;
sequence.s = NULL;
sequence.m = 0;
char name[1024];