MCPcopy Create free account
hub / github.com/Gecode/gecode / main

Function main

examples/word-square.cpp:146–162  ·  view source on GitHub ↗

\brief Main-function * \relates WordSquare */

Source from the content-addressed store, hash-verified

144 * \relates WordSquare
145 */
146int
147main(int argc, char* argv[]) {
148 FileSizeOptions opt("WordSquare");
149 opt.size(6);
150 opt.branching(WordSquare::BRANCH_LETTERS);
151 opt.branching(WordSquare::BRANCH_WORDS, "words");
152 opt.branching(WordSquare::BRANCH_LETTERS, "letters");
153 opt.parse(argc,argv);
154 dict.init(opt.file());
155 if (opt.size() > static_cast<unsigned int>(dict.len())) {
156 std::cerr << "Error: size must be between 0 and "
157 << dict.len() << std::endl;
158 return 1;
159 }
160 Script::run<WordSquare,DFS,SizeOptions>(opt);
161 return 0;
162}
163
164// STATISTICS: example-any

Callers

nothing calls this directly

Calls 6

branchingMethod · 0.80
lenMethod · 0.80
sizeMethod · 0.45
parseMethod · 0.45
initMethod · 0.45
fileMethod · 0.45

Tested by

no test coverage detected