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

Function main

examples/knights.cpp:406–431  ·  view source on GitHub ↗

\brief Main-function * \relates Knights */

Source from the content-addressed store, hash-verified

404 * \relates Knights
405 */
406int
407main(int argc, char* argv[]) {
408 SizeOptions opt("Knights");
409 opt.iterations(100);
410 opt.size(8);
411 opt.propagation(Knights::PROP_CIRCUIT);
412 opt.propagation(Knights::PROP_REIFIED, "reified");
413 opt.propagation(Knights::PROP_CIRCUIT, "circuit");
414 opt.branching(Knights::BRANCH_NAIVE);
415 opt.branching(Knights::BRANCH_NAIVE, "naive");
416 opt.branching(Knights::BRANCH_WARNSDORFF, "warnsdorff");
417
418#if defined(GECODE_HAS_QT) && defined(GECODE_HAS_GIST)
419 KnightsInspector ki;
420 opt.inspect.click(&ki);
421#endif
422
423 opt.parse(argc,argv);
424
425 if (opt.propagation() == Knights::PROP_REIFIED) {
426 Script::run<KnightsReified,DFS,SizeOptions>(opt);
427 } else {
428 Script::run<KnightsCircuit,DFS,SizeOptions>(opt);
429 }
430 return 0;
431}
432
433// STATISTICS: example-any
434

Callers

nothing calls this directly

Calls 6

iterationsMethod · 0.80
propagationMethod · 0.80
branchingMethod · 0.80
sizeMethod · 0.45
clickMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected