Changeset 16300 for misc/tools
- Timestamp:
- 11/14/18 15:27:42 (6 years ago)
- Location:
- misc/tools/HeuristicLab.Benchmarks/HeuristicLab.Benchmarks
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/tools/HeuristicLab.Benchmarks/HeuristicLab.Benchmarks/Encodings.SymbolicExpressionTree/SubtreeCrossoverPerformance.cs
r16299 r16300 39 39 public void StandardCrossover() => TestCrossoverPerformance(StandardCrossover); 40 40 41 [Benchmark]42 public void SimpleCrossoverRandom() => TestCrossoverPerformance(SimpleCrossoverRandom);43 44 [Benchmark]45 public void SimpleCrossoverProportional() => TestCrossoverPerformance(SimpleCrossoverProportional);46 47 41 #region helper methods 48 private void SimpleCrossoverRandom(IRandom random, ISymbolicExpressionTree par0, ISymbolicExpressionTree par1, double internalProb, int maxLength, int maxDepth)49 => SimpleCrossover.Cross(random, par0, par1, internalProb, maxLength, maxDepth, false, false);50 51 52 private void SimpleCrossoverProportional(IRandom random, ISymbolicExpressionTree par0, ISymbolicExpressionTree par1, double internalProb, int maxLength, int maxDepth)53 => SimpleCrossover.Cross(random, par0, par1, internalProb, maxLength, maxDepth, false, true);54 55 42 private void StandardCrossover(IRandom random, ISymbolicExpressionTree par0, ISymbolicExpressionTree par1, double internalProb, int maxLength, int maxDepth) 56 43 => SubtreeCrossover.Cross(random, par0, par1, internalProb, maxLength, maxDepth); -
misc/tools/HeuristicLab.Benchmarks/HeuristicLab.Benchmarks/Random/RandomPerformance.cs
r16299 r16300 7 7 [MinColumn, MaxColumn, MeanColumn, MedianColumn] 8 8 public class RandomPerformance { 9 //private readonly IRandom jsfRandom = new JsfRandom(1234);10 9 private readonly IRandom mersenneTwister = new MersenneTwister(1234); 11 10 private readonly IRandom fastRandom = new FastRandom(1234); … … 14 13 public int N { get; set; } 15 14 16 //[Benchmark] public double SimpleRandomInt() => IntPerformance(jsfRandom);17 15 [Benchmark] public double FastRandomInt() => IntPerformance(fastRandom); 18 16 [Benchmark] public double MersenneTwisterInt() => IntPerformance(mersenneTwister); 19 17 20 //[Benchmark] public double SimpleRandomDouble() => DoublePerformance(jsfRandom);21 18 [Benchmark] public double FastRandomDouble() => DoublePerformance(fastRandom); 22 19 [Benchmark] public double MersenneTwisterDouble() => DoublePerformance(mersenneTwister);
Note: See TracChangeset
for help on using the changeset viewer.