summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbmp.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/rbmp.cpp b/rbmp.cpp
index c34dce4..ce057a7 100644
--- a/rbmp.cpp
+++ b/rbmp.cpp
@@ -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);