Skip to content

Commit faec035

Browse files
committed
Enhance code to solve unresolved symbols of windows. Do not export mt, but use it internally.
1 parent 94d78e6 commit faec035

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/cpp/stat_tool/distribution.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,11 @@ void set_seed(int seed, std::mt19937 &generator)
596596
generator.seed(seed);
597597
}
598598

599+
STAT_TOOL_API void set_seed(int seed)
600+
{
601+
set_seed(seed, mt);
602+
}
603+
599604
/*--------------------------------------------------------------*/
600605
/**
601606
* \brief Computation of the column width for an integer value.

src/cpp/stat_tool/stat_tools.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,8 @@ namespace stat_tool {
10371037
STAT_TOOL_API extern std::mt19937 mt;
10381038
STAT_TOOL_API extern std::uniform_real_distribution<double> rand_unif;
10391039

1040-
STAT_TOOL_API void set_seed(int seed, std::mt19937 &generator=mt);
1040+
STAT_TOOL_API void set_seed(int seed, std::mt19937 &generator);
1041+
STAT_TOOL_API void set_seed(int seed);
10411042

10421043
STAT_TOOL_API int column_width(int);
10431044
STAT_TOOL_API int column_width(int min_value , int max_value);

0 commit comments

Comments
 (0)