- Timestamp:
- 07/03/12 15:50:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDepthConstrainedCrossover.cs
r7521 r8203 41 41 42 42 #region Parameter properties 43 public ConstrainedValueParameter<StringValue> DepthRangeParameter {44 get { return ( ConstrainedValueParameter<StringValue>)Parameters[DepthRangeParameterName]; }43 public IConstrainedValueParameter<StringValue> DepthRangeParameter { 44 get { return (IConstrainedValueParameter<StringValue>)Parameters[DepthRangeParameterName]; } 45 45 } 46 46 #endregion … … 89 89 var depthRange = new IntRange(); 90 90 const int depthOffset = 2; // skip the first 2 levels (root + startNode) 91 switch (( int)Enum.Parse(typeof(Ranges), mode)) {92 case (int)Ranges.HighLevel:91 switch ((Ranges)Enum.Parse(typeof(Ranges), mode)) { 92 case Ranges.HighLevel: 93 93 depthRange.Start = depthOffset; // skip the first 2 levels (root + startNode) 94 94 depthRange.End = depthRange.Start + (int)Math.Round(depth * 0.25); 95 95 break; 96 case (int)Ranges.Standard:96 case Ranges.Standard: 97 97 depthRange.Start = depthOffset + (int)Math.Round(depth * 0.25); 98 98 depthRange.End = depthRange.Start + (int)Math.Round(depth * 0.5); 99 99 break; 100 case (int)Ranges.LowLevel:100 case Ranges.LowLevel: 101 101 depthRange.Start = depthOffset + (int)Math.Round(depth * 0.75); 102 102 depthRange.End = Math.Max(depthRange.Start, depth);
Note: See TracChangeset
for help on using the changeset viewer.