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


C++ CmdLine::add方法代码示例

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


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

示例1: base

            gnuplot_prog ( TCLAP::CmdLine& cmd, shared_ptr<KeyGenerators::base> _keygen ) : base ( cmd, _keygen ),
                dataNameArg ( "o", "output", "Gnuplot data (all keys with correlation coefficient) file name", true, "", "path" ),
                scriptNameArg ( "s", "script-output", "Gnuplot script output (all keys with correlation coefficient) file name", true, "", "path" ),
                confidenceDataNameArg ( "r", "confidence-output", "Gnuplot data (best and second best keys with confidence interval) file name", true, "", "path" ),
                confidenceScriptNameArg ( "g", "confidence-script-output", "Gnuplot script output (best and second best keys with confidence interval) file name", true, "", "path" ),
                alphaArg ( "a", "alpha", "The alpha to compute the (1 - alpha) confidence interval", true, 0.05, "0-1" ),
                bestPearson() {
                bestPearson = Trace::Zero(KEYNUM);
				cmd.add ( dataNameArg );
				cmd.add ( scriptNameArg );
                cmd.add ( confidenceDataNameArg );
                cmd.add ( confidenceScriptNameArg );
                cmd.add ( alphaArg );
                currentTraces = 0;
			};
开发者ID:rbino,项目名称:dpacalc,代码行数:15,代码来源:gnuplot_prog.hpp

示例2: main

int main (int argc, char *argv[]) {

  /** Set up the command line arguments */
  TCLAP::CmdLine command ("Parition a graph based on sparsification",
                          ' ');
  TCLAP::SwitchArg randomSwitch ("r",
                                 "random",
                                 "Use a random graph",
                                 command,
                                 false);
  TCLAP::SwitchArg debugSwitch ("d",
                                "debug",
                                "Print debug messages",
                                 command,
                                 false);
  TCLAP::ValueArg<double> tRatio ("t",
                                  "t-ratio",
                                  "Tau ratio; how big can Tau be w.r.t N",
                                  true,
                                  2.0,
                                  "double");
  command.add (tRatio);
  TCLAP::ValueArg<double> sRatio ("s",
                                  "s-ratio",
                                  "Ratio for num samples to take w.r.t Tau",
                                  true,
                                  1.0,
                                  "double");
  command.add (sRatio);
  TCLAP::ValueArg<int> kSteps ("k",
                               "k-steps",
                               "The number of B.F.S steps for local graph",
                               true,
                               2,
                               "int");
  command.add (kSteps);
  TCLAP::ValueArg<int> nParts ("p",
                               "n-parts",
                               "The number of partitions to create",
                               true,
                               2,
                               "int");
  command.add (nParts);
  TCLAP::ValueArg<int> rSeed ("x",
                              "r-seed",
                              "The seed for the PRNG",
                               false,
                               0,
                               "int");
  command.add (rSeed);
  TCLAP::ValueArg<bool> isErdos ("g",
                                 "r-type",
                                 "Is this a Erdos-Renyi graph",
                                  false,
                                  false,
                                  "bool");
  command.add (isErdos);
  TCLAP::ValueArg<int> nVerts ("m",
                               "n-verts",
                               "The number of vertices to generate",
                               false,
                               10,
                               "int");
  command.add (nVerts);
  TCLAP::ValueArg<int> nEdges ("n",
                               "n-edges",
                               "The number of edges to generate",
                               false,
                               10*9,
                               "int");
  command.add (nEdges);
  TCLAP::ValueArg<double> minWeight ("l",
                                     "min-weight",
                                     "Minimum edge weight",
                                     false,
                                     1.0,
                                     "double");
  command.add (minWeight);
  TCLAP::ValueArg<double> maxWeight ("u",
                                     "max-weight",
                                     "Maximum edge weight",
                                     false,
                                     1.0,
                                     "double");
  command.add (maxWeight);
  TCLAP::ValueArg<std::string> fileType ("i",
                                         "input-file",
                                         "Type of the file to read",
                                         false,
                                         "MATRIX_MARKET",
                                         "string");
  command.add (fileType);
  TCLAP::ValueArg<std::string> fileName ("f",
                                         "file-name",
                                         "Name of the file to read",
                                         false,
                                         "",
                                         "string");
  command.add (fileName);

//.........这里部分代码省略.........
开发者ID:pkambadu,项目名称:EffectiveResistance,代码行数:101,代码来源:effective_resistance.cpp

示例3: add

 void add(TCLAP::CmdLine &cmd) {
     cmd.add(outputArg);
     cmd.add(threadsArg);
     cmd.add(heightArg);
     cmd.add(widthArg);
 }
开发者ID:kingofthebongo2008,项目名称:nvidia-mesh-tools,代码行数:6,代码来源:Baker.cpp

示例4: base

			aes128round1 ( TCLAP::CmdLine& cmd, shared_ptr<KeyGenerators::base> _keygen ) : base ( cmd, _keygen ),
				whichsboxArg ( "b", "sbox", "From which SBOX output should I start to correlate?", false, 0, "0-15" ),
				sboxnumArg ( "v", "sboxnum", "How many consecutive SBOXes should I consider?", false, 1, "1-8" ) {
				cmd.add ( whichsboxArg );
				cmd.add ( sboxnumArg );
			}
开发者ID:maxximino,项目名称:dpacalc,代码行数:6,代码来源:aes128round1.hpp


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