当前位置: 首页>>代码示例>>C++>>正文


C++ Timing::markbeg方法代码示例

本文整理汇总了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;
    }
  }
开发者ID:kopang,项目名称:LinearSuffixArray,代码行数:72,代码来源:test.C

示例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;

//.........这里部分代码省略.........
开发者ID:answer19831020,项目名称:ltr-finder,代码行数:101,代码来源:main.cpp


注:本文中的Timing::markbeg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。