Last change
on this file since 14875 was
14875,
checked in by pkimmesw, 7 years ago
|
#2665 BenchmarkSuite, all examples, partially tested, VectorExpressions added
|
File size:
475 bytes
|
Line | |
---|
1 | namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
|
---|
2 | public abstract class StatelessExpression : Expression {
|
---|
3 | private int hashCode;
|
---|
4 |
|
---|
5 | protected StatelessExpression() {
|
---|
6 | hashCode = GetType().GetHashCode();
|
---|
7 | }
|
---|
8 |
|
---|
9 | public override int GetHashCode() {
|
---|
10 | return hashCode;
|
---|
11 | }
|
---|
12 |
|
---|
13 | public override bool Equals(object obj) {
|
---|
14 | return ReferenceEquals(this, obj) ||
|
---|
15 | hashCode == obj.GetHashCode();
|
---|
16 | }
|
---|
17 | }
|
---|
18 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.