本文整理汇总了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;
};
示例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);
//.........这里部分代码省略.........
示例3: add
void add(TCLAP::CmdLine &cmd) {
cmd.add(outputArg);
cmd.add(threadsArg);
cmd.add(heightArg);
cmd.add(widthArg);
}
示例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 );
}