Changeset 5510 for branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers
- Timestamp:
- 02/17/11 13:51:04 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/MinAverageMaxSymbolicExpressionTreeLengthAnalyzer.cs
r5499 r5510 45 45 46 46 #region parameter properties 47 public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {48 get { return ( ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }47 public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { 48 get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; } 49 49 } 50 50 public ScopeTreeLookupParameter<DoubleValue> SymbolicExpressionTreeLengthParameter { … … 73 73 public MinAverageMaxSymbolicExpressionTreeLengthAnalyzer() 74 74 : base() { 75 Parameters.Add(new ScopeTreeLookupParameter< SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose length should be calculated."));75 Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose length should be calculated.")); 76 76 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(SymbolicExpressionTreeLengthParameterName, "The length of the symbolic expression tree.")); 77 77 Parameters.Add(new ValueLookupParameter<DataTable>(SymbolicExpressionTreeLengthsParameterName, "The data table to store the symbolic expression tree lengths.")); -
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs
r5499 r5510 42 42 43 43 #region parameter properties 44 public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {45 get { return ( ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }44 public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { 45 get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; } 46 46 } 47 47 public ILookupParameter<DataTable> SymbolFrequenciesParameter { … … 64 64 public SymbolicExpressionSymbolFrequencyAnalyzer() 65 65 : base() { 66 Parameters.Add(new ScopeTreeLookupParameter< SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to analyze."));66 Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to analyze.")); 67 67 Parameters.Add(new ValueLookupParameter<DataTable>(SymbolFrequenciesParameterName, "The data table to store the symbol frequencies.")); 68 68 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection where the symbol frequencies should be stored.")); … … 73 73 74 74 public override IOperation Apply() { 75 ItemArray< SymbolicExpressionTree> expressions = SymbolicExpressionTreeParameter.ActualValue;75 ItemArray<ISymbolicExpressionTree> expressions = SymbolicExpressionTreeParameter.ActualValue; 76 76 ResultCollection results = ResultsParameter.ActualValue; 77 77 … … 102 102 } 103 103 104 public static IEnumerable<KeyValuePair<string, double>> CalculateSymbolFrequencies(IEnumerable< SymbolicExpressionTree> trees) {104 public static IEnumerable<KeyValuePair<string, double>> CalculateSymbolFrequencies(IEnumerable<ISymbolicExpressionTree> trees) { 105 105 Dictionary<string, double> symbolFrequencies = new Dictionary<string, double>(); 106 106 int totalNumberOfSymbols = 0;
Note: See TracChangeset
for help on using the changeset viewer.