Skip to content
Snippets Groups Projects
Commit 86adc5b1 authored by Matthew Webster's avatar Matthew Webster
Browse files

force non-time based seed

parent 3b392f59
No related branches found
No related tags found
No related merge requests found
......@@ -382,6 +382,9 @@ namespace Melodic{
//seed the random number generator
double tmptime = time(NULL);
if ( opts.seed.value() != -1 ) {
tmptime = opts.seed.value();
}
srand((unsigned int) tmptime);
if(opts.paradigmfname.value().length()>0){
......
......@@ -116,6 +116,7 @@ class MelodicOptions {
Option<int> dummy;
Option<int> repeats;
Option<int> seed;
Option<float> nlconst1;
Option<float> nlconst2;
Option<float> smooth_probmap;
......@@ -351,6 +352,9 @@ class MelodicOptions {
repeats(string("--repeats"), 1,
string("number of repeats (multistart)"),
false, requires_argument, false),
seed(string("--seed"), -1,
string("integer seed for melodic"),
false, requires_argument, false),
nlconst1(string("--nl1,--nlconst1"), 1.0,
string("nonlinear constant 1"),
false, requires_argument, false),
......@@ -449,6 +453,7 @@ class MelodicOptions {
options.add(axials_str);
options.add(dummy);
options.add(repeats);
options.add(seed);
options.add(nlconst1);
options.add(nlconst2);
options.add(smooth_probmap);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment