Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/17 01:15:25 (8 years ago)
Author:
pkimmesw
Message:

#2665 BenchmarkSuite, all examples, partially tested, VectorExpressions added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatelessExpression.cs

    r14733 r14875  
    11namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
    22  public abstract class StatelessExpression : Expression {
    3     private readonly int hashCode;
     3    private int hashCode;
     4
    45    protected StatelessExpression() {
    5       this.hashCode = this.GetType().GetHashCode();
     6      hashCode = GetType().GetHashCode();
    67    }
    78
    89    public override int GetHashCode() {
    9       return this.hashCode;
     10      return hashCode;
    1011    }
    1112
    1213    public override bool Equals(object obj) {
    13       return ReferenceEquals(this, obj);
     14      return ReferenceEquals(this, obj) ||
     15             hashCode == obj.GetHashCode();
    1416    }
    1517  }
Note: See TracChangeset for help on using the changeset viewer.