Changeset 14908 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefulExpression.cs
- Timestamp:
- 05/02/17 22:03:01 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/StatefulExpression.cs
r14777 r14908 11 11 12 12 protected StatefulExpression(T state) { 13 this.State = state;13 State = state; 14 14 } 15 15 16 16 protected virtual int CalcHashCode() { 17 return this.State.GetHashCode();17 return State.GetHashCode(); 18 18 } 19 19 … … 22 22 get 23 23 { 24 if (stringRepresentation == null) stringRepresentation = this.State.ToString();24 if (stringRepresentation == null) stringRepresentation = State.ToString(); 25 25 return stringRepresentation; 26 26 } … … 31 31 return true; 32 32 33 if ( this.GetType() != obj.GetType())33 if (GetType() != obj.GetType()) 34 34 return false; 35 35 36 36 var other = (StatefulExpression<T>)obj; 37 37 38 return ReferenceEquals( this.State, other.State) ||39 this.GetHashCode() == other.GetHashCode();38 return ReferenceEquals(State, other.State) || 39 GetHashCode() == other.GetHashCode(); 40 40 } 41 41
Note: See TracChangeset
for help on using the changeset viewer.