Changeset 6949 for trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ProbabilisticTreeCreaterTest.cs
- Timestamp:
- 11/04/11 14:57:32 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ProbabilisticTreeCreaterTest.cs
r6911 r6949 60 60 stopwatch.Stop(); 61 61 62 int count = 0; 63 int depth = 0; 62 64 foreach (var tree in randomTrees) { 63 65 Util.IsValid(tree); 66 count += tree.Length; 67 depth += tree.Depth; 64 68 } 65 69 double msPerRandomTreeCreation = stopwatch.ElapsedMilliseconds / (double)POPULATION_SIZE; … … 70 74 Util.GetFunctionDistributionString(randomTrees) + Environment.NewLine + 71 75 Util.GetNumberOfSubtreesDistributionString(randomTrees) + Environment.NewLine + 72 Util.GetTerminalDistributionString(randomTrees) + Environment.NewLine 76 Util.GetTerminalDistributionString(randomTrees) + Environment.NewLine + 77 "Average tree depth: " + depth / POPULATION_SIZE + Environment.NewLine + 78 "Average tree length: " + count / POPULATION_SIZE + Environment.NewLine + 79 "Total nodes created: " + count + Environment.NewLine 73 80 ); 74 81 Assert.IsTrue(Math.Round(1000.0 / (msPerRandomTreeCreation)) > 250); // must achieve more than 250 random trees / s
Note: See TracChangeset
for help on using the changeset viewer.