Skip to main content

Questions tagged [random]

This tag is for questions pertaining to random numbers, whether pseudo random or truly random.

6 votes
1 answer
383 views

This is a follow-up question for An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. I am trying to mimic Matlab's rand function into TinyDIP library. The ...
JimmyHu's user avatar
  • 7,575
8 votes
4 answers
17k views

The program assignment: A drunkard in a grid of streets randomly picks one of four directions and stumbles to the next intersection, then again randomly picks one of four directions, and so on. ...
user avatar
58 votes
4 answers
36k views

Many people seed their Mersenne Twister engines like this: std::mt19937 rng(std::random_device{}()); However, this only provides a single ...
Baum mit Augen's user avatar
110 votes
16 answers
244k views

I want to generate a list of N different random numbers: ...
Kao's user avatar
  • 2,434
12 votes
3 answers
6k views

I am writing a dice roller winforms application using C# 2012 VS. Dice roller is set up for playing Shadowrun tabletop. I feel that there might be too much code going into the GUI, but I am unsure ...
Andy Hoffman's user avatar
18 votes
2 answers
1k views

Password generators are extremely popular on CodeReview with beginners to both coding in general and Python in particular, for a number of reasons: They're (seemingly) easy to implement They offer an ...
9 votes
1 answer
3k views

I have made class to setup a random number bases on <random>. It works fine, but I have doubt in ...
MORTAL's user avatar
  • 3,320
7 votes
3 answers
3k views

I don't intend on implementing this into an application yet as I'm going to test it first. As such, it doesn't do much beyond rolling. It also overloads some "typical" operators such as ...
Jamal's user avatar
  • 35.2k
6 votes
2 answers
199 views

[NOTE] This question can be depreciated in favor of version 0.3. This is a code revision of a previous post and works well. Code has been reworked to be far more clear and concise, thanks to ...
Miller's user avatar
  • 533
11 votes
3 answers
12k views

I wrote a small function to return a random in a given range: ...
GenuinePlaceholder's user avatar
9 votes
3 answers
554 views

In my original question: Generically encapsulating random generators and distributions into a class template I was given some excellent suggestions from two very informative users. I will give a basic ...
Francis Cugler's user avatar
6 votes
1 answer
738 views

After reading this question I wanted to write a short example of how a list or sequence could be shuffled in .net. The result turned out to not be very short: Program.cs ...
Johnbot's user avatar
  • 3,084
4 votes
1 answer
175 views

I am going to make this code below into the second release of my library, but I want to make sure I haven't missed anything. If there are improvements that can be made, I'd like to implement them. ...
some_user_3's user avatar
3 votes
1 answer
830 views

I have some fascination with terrain generators, so I whipped up this generator in Python. The way it works is pretty simple, but I figure that I should give an explanation for those who don't want to ...
Ethan Bierlein's user avatar
3 votes
1 answer
179 views

[NOTE] This question can be depreciated in favor of version 0.31. This is a code revision of a previous post and works well. The purpose of this code is to produce a universe of points, randomly ...
Miller's user avatar
  • 533

15 30 50 per page
1
2 3 4 5 6