Changeset 16300 for misc/tools/HeuristicLab.Benchmarks/HeuristicLab.Benchmarks/Encodings.SymbolicExpressionTree/SubtreeCrossoverPerformance.cs
- Timestamp:
- 11/14/18 15:27:42 (6 years ago)
- File:
-
- 1 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);
Note: See TracChangeset
for help on using the changeset viewer.