Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/17/10 14:43:04 (14 years ago)
Author:
mkommend
Message:

removed ScaledSymbolicExpressionTree from the scopes in the ValidationBestScaledSymbolicReressionSolutionAnalyzer and
made SymbolicExpressionTree to work without a root node (ticket #938)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTree.cs

    r3710 r3926  
    5353    public int Size {
    5454      get {
     55        if (root == null)
     56          return 0;
    5557        return root.GetSize();
    5658      }
     
    5961    public int Height {
    6062      get {
     63        if (root == null)
     64          return 0;
    6165        return root.GetHeight();
    6266      }
     
    7377
    7478    public IEnumerable<SymbolicExpressionTreeNode> IterateNodesPrefix() {
     79      if (root == null)
     80        return new SymbolicExpressionTreeNode[0];
    7581      return root.IterateNodesPrefix();
    7682    }
    7783    public IEnumerable<SymbolicExpressionTreeNode> IterateNodesPostfix() {
     84      if (root == null)
     85        return new SymbolicExpressionTreeNode[0];
    7886      return root.IterateNodesPostfix();
    7987    }
     
    8290      SymbolicExpressionTree clone = new SymbolicExpressionTree();
    8391      cloner.RegisterClonedObject(this, clone);
    84       clone.root = (SymbolicExpressionTreeNode)this.root.Clone();
     92      if (root != null)
     93        clone.root = (SymbolicExpressionTreeNode)this.root.Clone();
    8594      return clone;
    8695    }
Note: See TracChangeset for help on using the changeset viewer.