Changeset 17918 for branches/3105_PythonFormatter/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/InfixExpressionParser.cs
- Timestamp:
- 03/29/21 09:54:58 (3 years ago)
- Location:
- branches/3105_PythonFormatter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3105_PythonFormatter
- Property svn:mergeinfo changed
/trunk (added) merged: 17845,17856,17858-17859,17861,17867,17871-17873,17888-17889,17902-17903,17906-17914
- Property svn:mergeinfo changed
-
branches/3105_PythonFormatter/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/3105_PythonFormatter/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/InfixExpressionParser.cs
r17180 r17918 64 64 } 65 65 66 private class Symbol NameComparer : IEqualityComparer<ISymbol>, IComparer<ISymbol> {66 private class SymbolComparer : IEqualityComparer<ISymbol>, IComparer<ISymbol> { 67 67 public int Compare(ISymbol x, ISymbol y) { 68 68 return x.Name.CompareTo(y.Name); … … 70 70 71 71 public bool Equals(ISymbol x, ISymbol y) { 72 return Compare(x, y) == 0;72 return x.GetType() == y.GetType(); 73 73 } 74 74 75 75 public int GetHashCode(ISymbol obj) { 76 return obj. Name.GetHashCode();76 return obj.GetType().GetHashCode(); 77 77 } 78 78 } … … 80 80 // the lookup table is also used in the corresponding formatter 81 81 internal static readonly BidirectionalLookup<string, ISymbol> 82 knownSymbols = new BidirectionalLookup<string, ISymbol>(StringComparer.InvariantCulture, new Symbol NameComparer());82 knownSymbols = new BidirectionalLookup<string, ISymbol>(StringComparer.InvariantCulture, new SymbolComparer()); 83 83 84 84 private Constant constant = new Constant();
Note: See TracChangeset
for help on using the changeset viewer.