Questions tagged [random-seed]

A random-seed is used to initialize a pseudo-random number generator in many programming languages.

937 questions
-4
votes
3 answers

How to improve the uniformly distributed of a given random function to generate uniformly distributed numbers?

The question is related on Linux like Debian or Ubuntu, bash and a given function which use RANDOM. Every improvement should use bash only. Given are the follow function: getRND(){ min="${1:-1}" ## min is the first parameter, or 1 if no…
Alfred.37
  • 181
  • 1
  • 12
-4
votes
1 answer

Boost Random Number Not Change

I have some problem when generating random number with boost library in CPP. When I try printout random number, the value return same value. Here is my code. for(int i = 0; i < TOTAL_PARTICLES; i++) { boost::random::mt19937…
Eko Rudiawan
  • 187
  • 3
  • 9
-4
votes
1 answer

User's input to create Seed for Random Number generation

Random number generators depend on a good seed in order to provide real random numbers. On source for good seed is to take the input of the user, since human behaviours is not deterministic. One way to do that is to let user's enter some characters…
Aedvald Tseh
  • 1,757
  • 16
  • 31
-4
votes
2 answers

Pick a subset from a collection based on a seeded random while excluding already chosen sets

I want to randomly pick a set of 3 from a collection (1-10) based on a seed that is a date. I want to pick 3 new items every day not repeating the ones i've picked the day before. Picking the items is not the problem but how do i know which ones…
-5
votes
2 answers

Why does rand()%10+1 give me a number between 1-10?

Im fairly new to programming So i was actually trying to figure something out Why does rand()%10+1 give us a number between 1-10 whereas 32767%10 is actually 7?
-5
votes
3 answers

Generate super random number in c++

C++11 Introduced the class that allows for generating very random numbers, it also creates an even distribution of random numbers. There is also implementation to generate a seed (a number used to make the Random Number Generator more random). I am…
Katianie
  • 589
  • 1
  • 9
  • 38
-7
votes
1 answer

C++ generate random numbers for a given seed

I need to create a random number generator that generates n random numbers for a given seed s. k largest or smallest values generated are also known. ex1 : Seed (s): 123 No of random numbers (n):100 largest 10 random numbers…
rami
  • 1
  • 3
1 2 3
62
63