diff options
-rw-r--r-- | rbmp.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -112,11 +112,29 @@ public: } }; -int main() { +int main(int argc, char* argv[]) { unsigned n = 100; unsigned maxSteps = 1e8; double beliefThreshold = 1; + int opt; + + while ((opt = getopt(argc, argv, "n:m:t:")) != -1) { + switch (opt) { + case 'n': + n = atoi(optarg); + break; + case 'm': + maxSteps = (unsigned)atof(optarg); + break; + case 't': + beliefThreshold = atof(optarg); + break; + default: + exit(1); + } + } + Rng r; Graph G(n, r); |