8 int main(
int ,
char* argv[]) {
18 catch (
const std::exception&) {
19 std::cerr <<
"usage: " << argv[0] <<
" R a n_samples\n";
23 std::mt19937_64
engine{std::random_device{}()};
24 std::piecewise_linear_distribution<double>
25 woods_saxon_dist{1000, 0, R+10.*
a, [&
R, &
a](
double r) {
26 return r*
r/(1. + std::exp((
r-R)/a));
29 for (
int i = 0;
i <
N; ++
i)
30 std::cout << woods_saxon_dist(
engine) <<
'\n';