本文整理汇总了C++中Timing::markbeg方法的典型用法代码示例。如果您正苦于以下问题:C++ Timing::markbeg方法的具体用法?C++ Timing::markbeg怎么用?C++ Timing::markbeg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timing
的用法示例。
在下文中一共展示了Timing::markbeg方法的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
int main (int argc, char *argv[])
{
char *myString;
int stringLength;
int i;
string namePattern = "";
char *version = "1.06";
bool display_usage = false;
char c;
CPSSCAN ps_scan;
PBS pbs;
PPT ppt(PPT_window, 4);
char *tRNA_file = NULL;
char *ps_dir = NULL;
bool ishtml = false;
struct re_pattern_buffer id_filter;
id_filter.allocated = 0;
id_filter.buffer = 0;
id_filter.fastmap = 0;
id_filter.translate = 0;
Timing timehere;
Timing timeall;
timeall.markbeg();
while ((c = getopt (argc, argv, "ho:t:e:m:u:D:d:L:l:p:s:cw:S:a:P:g:F:B:b:J:j:O:r:M:f:xEiCG:T:")) > 0)
{
switch (c)
{
case 'h':
display_usage = true;
break;
case 'o':
gap_open = atoi (optarg);
break;
case 't':
gap_ext = atoi (optarg);
break;
case 'e':
gap_end = atoi (optarg);
break;
case 'm':
score_match = atoi (optarg);
break;
case 'u':
score_mismatch = atoi (optarg);
break;
case 'D':
Dmax = atoi (optarg);
break;
case 'd':
Dmin = atoi (optarg);
break;
case 'L':
Lmax = atoi (optarg);
break;
case 'l':
Lmin = atoi (optarg);
break;
case 'p':
Lex = atoi (optarg);
break;
case 'c':
CHECK_PAIRS = 1;
break;
case 'x':
ishtml = true;
break;
case 'E':
edge_signal = true;
break;
case 'i':
showPairNum = true;
break;
case 'w':
wrought = atoi(optarg);
break;
case 'P':
namePattern = optarg;
break;
//.........这里部分代码省略.........