Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/03/14 17:04:46 (10 years ago)
Author:
bburlacu
Message:

#1772: Merged trunk changes. Updated PhenotypicSimilarityCalculator, updated FragmentGraphView.

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding

  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs

    r11460 r11638  
    2020#endregion
    2121
    22 using System.Linq;
    2322using System.Text;
    2423using HeuristicLab.Common;
     
    5958      strBuilder.Append("(");
    6059      // internal nodes or leaf nodes?
    61       if (node.Subtrees.Count() > 0) {
     60      if (node.SubtreeCount > 0) {
    6261        // symbol on same line as '('
    6362        strBuilder.AppendLine(node.ToString());
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/EmptySymbolicExpressionTreeGrammar.cs

    r11494 r11638  
    2727using HeuristicLab.Common;
    2828using HeuristicLab.Core;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2930
    3031namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
     32
     33  [StorableClass]
    3134  internal sealed class EmptySymbolicExpressionTreeGrammar : NamedItem, ISymbolicExpressionTreeGrammar {
     35    [Storable]
    3236    private ISymbolicExpressionGrammar grammar;
     37
     38    [StorableConstructor]
     39    private EmptySymbolicExpressionTreeGrammar(bool deserializing) : base(deserializing) {}
    3340    internal EmptySymbolicExpressionTreeGrammar(ISymbolicExpressionGrammar grammar)
    3441      : base() {
     
    128135      throw new NotSupportedException();
    129136    }
    130 
     137   
     138    #pragma warning disable 0169 //disable usage warning
    131139    public event EventHandler Changed;
     140    #pragma warning restore 0169
    132141    #endregion
    133142  }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj

    r11499 r11638  
    1111    <RootNamespace>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding</RootNamespace>
    1212    <AssemblyName>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</AssemblyName>
    13     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     13    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1414    <TargetFrameworkProfile>
    1515    </TargetFrameworkProfile>
     
    4747    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
    4848    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     49    <Prefer32Bit>false</Prefer32Bit>
    4950  </PropertyGroup>
    5051  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    5657    <WarningLevel>4</WarningLevel>
    5758    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     59    <Prefer32Bit>false</Prefer32Bit>
    5860  </PropertyGroup>
    5961  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
     
    6567    <ErrorReport>prompt</ErrorReport>
    6668    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     69    <Prefer32Bit>false</Prefer32Bit>
    6770  </PropertyGroup>
    6871  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
     
    7477    <ErrorReport>prompt</ErrorReport>
    7578    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     79    <Prefer32Bit>false</Prefer32Bit>
    7680  </PropertyGroup>
    7781  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     
    8387    <ErrorReport>prompt</ErrorReport>
    8488    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     89    <Prefer32Bit>false</Prefer32Bit>
    8590  </PropertyGroup>
    8691  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
     
    9297    <ErrorReport>prompt</ErrorReport>
    9398    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     99    <Prefer32Bit>false</Prefer32Bit>
    94100  </PropertyGroup>
    95101  <ItemGroup>
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs

    r11208 r11638  
    132132
    133133    private static int GetBranchLevel(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode point) {
    134       if (point == null || point.Parent == null)
    135         return int.MaxValue;
    136 
    137134      if (root == point)
    138135        return 0;
    139 
    140       if (root == point.Parent)
    141         return 1;
    142 
    143       var p = point.Parent;
    144       int level = 1;
    145 
    146       while (p != root) {
    147         level++;
    148         p = p.Parent;
    149 
    150         if (p == null)
    151           return int.MaxValue; // root is not an ancestor of point
    152       }
    153 
    154       return level;
    155     }
    156 
    157     private static int GetBranchLevelOld(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode point) {
    158136      foreach (var subtree in root.Subtrees) {
    159137        int branchLevel = GetBranchLevel(subtree, point);
Note: See TracChangeset for help on using the changeset viewer.