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


C++ ArgParser::floatafter方法代码示例

本文整理汇总了C++中ArgParser::floatafter方法的典型用法代码示例。如果您正苦于以下问题:C++ ArgParser::floatafter方法的具体用法?C++ ArgParser::floatafter怎么用?C++ ArgParser::floatafter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ArgParser的用法示例。

在下文中一共展示了ArgParser::floatafter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

void main(int argc,String *argv) {
  mcheck();
  randomise();

  a=ArgParser(argc,argv);

 
  nnname=a.argafter("-nn","nn name","current.net");
  tsname=a.argafter("-ts","trainset name","current.pat");
  eacq=a.intafter("-eqcq","Edge Angle Cancelling histogram quantisation",16);
  eacrad=a.intafter("-eacrad","Default radius for eac",6);
  glq=a.intafter("-glq","greylevel quantisation",32);
  glhistrad=a.intafter("-glvr","Default radius for gl variance",3);
  windres=a.intafter("-wskip","pixel skip for window segmentation",5);
  botres=a.intafter("-br","bottom res for neighbour segmenter (botres*2^n=topres)",2);
  topres=a.intafter("-tr","top res",32);
  notext=a.floatafter("-nt","not text if < than",-4.5);
  istext=a.floatafter("-it","is text if > than",-2.0);
  show=a.argexists("-show","show results of measures");
  usenumpostrainexs=a.intafter("-nptes","number of positive training examples to output",50);
  usenumnegtrainexs=a.intafter("-nntes","number of positive training examples to output",50);
  scale=a.floatafter("-s","scale",0.5);
  morphrad=a.intafter("-mr","radius for morphology",3);
  twooutnodes=true; // a.argexists("-to","two output nodes");
  minarea=a.intafter("-ms","minimum size of kept region",200);
//  ghistscale=a.floatafter("-ghs","scale for hist stability",0.5);

  a.opts.add("task = trainset | newnn | trainnn | scan | test");
  String task=a.arg("task");
 
  if (Seq(task,"trainset")) {
      a.opts.add("trainset task = new | image | finish");
      String task2=a.arg("trainset task");

      if (Seq(task2,"new")) {
        tsname=a.argor(tsname);
        a.done();
        makenewtrainingset();

      } else if (Seq(task2,"image")) {
        iname=a.arg("image file");
        a.done();
        trainimage();

      } else if(Seq(task2,"finish")) {
        a.done();
        finishtrainingset();

      } else {
        a.done();
        error("Please choose a task for the training set");

      }

  } else if (Seq(task,"newnn")) {
      a.opts.add("nn type = hopfield | banana");
      String type=a.arg("nn type");
      a.done();
      makenewnn(type);

  } else if (Seq(task,"trainnn")) {
      a.done();
      trainnetwork();
    
  } else if (Seq(task,"scan")) {
      iname=a.arg("image file");
      a.done();
      scanimage();
    
  } else if (Seq(task,"test")) {
      iname=a.arg("image file");
      a.done();
      testimage();

  } else {
      a.done();
      error("Please choose a task.");

  }

  printf("jnn : Finished.\n");
开发者ID:10crimes,项目名称:code,代码行数:81,代码来源:jnn.c



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