Class ArrayComparer<T>
Elementwise comparer for arrays.
Inheritance
System.Object
ArrayComparer<T>
Implements
System.Collections.Generic.IEqualityComparer<T[]>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Numerics.Comparers
Assembly: Mars.Numerics.dll
Syntax
public class ArrayComparer<T> : IEqualityComparer<T[]> where T : IEquatable<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
| Improve this Doc View SourceEquals(T[], T[])
Determines whether two instances are equal.
Declaration
public bool Equals(T[] x, T[] y)
Parameters
Type | Name | Description |
---|---|---|
T[] | x | The first object to compare. |
T[] | y | The second object to compare. |
Returns
Type | Description |
---|---|
System.Boolean |
true if the specified object is equal to the other; otherwise, false .
|
GetHashCode(T[])
Returns a hash code for a given instance.
Declaration
public int GetHashCode(T[] obj)
Parameters
Type | Name | Description |
---|---|---|
T[] | obj | The instance. |
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the instance, suitable for use in hashing algorithms and data structures like a hash table. |
Implements
System.Collections.Generic.IEqualityComparer<T>