Skip to content

Commit

Permalink
Add override
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Nov 12, 2024
1 parent ef46659 commit 8d73abe
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/gnu/distributions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Binomial: public Random {
, d(n ,u)
{}

double operator()() {
double operator()() override {
return d(*generator());
}

Expand All @@ -24,7 +24,7 @@ class DiscreteUniform: public Random {
, d(low, high)
{}

double operator()() {
double operator()() override {
return d(*generator());
}
private:
Expand All @@ -38,7 +38,7 @@ class Erlang: public Random {
, d(mean * mean / variance, variance / mean)
{}

double operator()() {
double operator()() override {
return d(*generator());
}

Expand All @@ -53,7 +53,7 @@ class Geometric: public Random {
, d(1 / (mean + 1))
{}

double operator()() {
double operator()() override {
return 1. + d(*generator());
}
private:
Expand All @@ -67,7 +67,7 @@ class LogNormal: public Random {
, d(std::log(mean * mean / std::sqrt(variance + (mean * mean))), std::sqrt(std::log(variance/(mean * mean) + 1)))
{}

double operator()() {
double operator()() override {
return d(*generator());
}
private:
Expand All @@ -81,7 +81,7 @@ class NegativeExpntl: public Random {
, d(1 / mean)
{}

double operator()() {
double operator()() override {
return d(*generator());
}
private:
Expand All @@ -95,7 +95,7 @@ class Normal: public Random {
, d(mean, std::sqrt(variance))
{}

double operator()() {
double operator()() override {
return d(*generator());
}

Expand All @@ -110,7 +110,7 @@ class Poisson: public Random {
, d(mean)
{}

double operator()() {
double operator()() override {
return d(*generator());
}

Expand All @@ -126,7 +126,7 @@ class Uniform: public Random {
, d(low, high)
{}

double operator()() {
double operator()() override {
return d(*generator());
}

Expand All @@ -141,7 +141,7 @@ class Weibull: public Random {
, d(alpha, beta)
{}

double operator()() {
double operator()() override {
return d(*generator());
}

Expand Down

0 comments on commit 8d73abe

Please sign in to comment.