Last change
on this file since 14513 was
14513,
checked in by pkimmesw, 7 years ago
|
#2665 Added Problem.ProgramSynthesis Project, Fixed Expression Issues, Fixed Code Generation
|
File size:
461 bytes
|
Line | |
---|
1 | namespace HeuristicLab.Algorithms.PushGP.Generators {
|
---|
2 | using System.Threading;
|
---|
3 |
|
---|
4 | using HeuristicLab.Algorithms.PushGP.Data.Random;
|
---|
5 | using HeuristicLab.Core;
|
---|
6 |
|
---|
7 | public class FloatGenerator {
|
---|
8 | private static readonly ThreadLocal<IRandom> rand = RandomFactory.GetRandom();
|
---|
9 |
|
---|
10 | public static double RandomFloat(double min = double.MinValue, double max = double.MaxValue) {
|
---|
11 | return rand.Value.NextDouble() * (max - min) + min;
|
---|
12 | }
|
---|
13 | }
|
---|
14 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.