Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Generators/BooleanGenerator.cs @ 14513

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: 398 bytes
Line 
1namespace HeuristicLab.Algorithms.PushGP.Generators {
2  using System.Threading;
3
4  using HeuristicLab.Algorithms.PushGP.Data.Random;
5  using HeuristicLab.Core;
6
7  public static class BooleanGenerator {
8    private static readonly ThreadLocal<IRandom> rand = RandomFactory.GetRandom();
9
10    public static bool RandomBoolean() {
11      return rand.Value.NextDouble() > 0.5;
12    }
13  }
14}
Note: See TracBrowser for help on using the repository browser.