Skip to content

Commit

Permalink
added forgotten file
Browse files Browse the repository at this point in the history
  • Loading branch information
ifsmirnov committed Mar 20, 2017
1 parent 4c44da0 commit 633caef
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions random_inl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#ifndef JNGEN_INCLUDE_RANDOM_INL_H
#error File "random_inl.h" must not be included directly.
#endif

namespace jngen {

int Random::next(int l, int r) {
return l + next(r-l+1);
}

long long Random::next(long long l, long long r) {
return l + next(r-l+1);
}

size_t Random::next(size_t l, size_t r) {
return l + next(r-l+1);
}

double Random::next(double l, double r) {
return l + next(r-l);
}

int Random::wnext(int n, int w) {
return baseWnext(n, w);
}

long long Random::wnext(long long n, int w) {
return baseWnext(n, w);
}

size_t Random::wnext(size_t n, int w) {
return baseWnext(n, w);
}

double Random::wnext(double n, int w) {
return baseWnext(n, w);
}

int Random::wnext(int l, int r, int w) {
return l + wnext(r-l+1, w);
}

long long Random::wnext(long long l, long long r, int w) {
return l + wnext(r-l+1, w);
}

size_t Random::wnext(size_t l, size_t r, int w) {
return l + wnext(r-l+1, w);
}

double Random::wnext(double l, double r, int w) {
return l + wnext(r-l, w);
}

} // namespace jngen

0 comments on commit 633caef

Please sign in to comment.