General comparer which supports multiple directions and comparison of absolute values.
Inheritance HierarchySystemObject
Accord.Math.ComparersGeneralComparer
Accord.Math (in Accord.Math.dll) Version: 3.8.0
SyntaxThe GeneralComparer type exposes the following members.
Constructors Properties Name Description DirectionGets or sets the sorting direction used by this comparer.
Top Methods Name Description Compare(Double, Double)Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
Compare(Int32, Int32)Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object.) FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.) GetHashCodeServes as the default hash function.
(Inherited from Object.) GetTypeGets the Type of the current instance.
(Inherited from Object.) MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object.) ToStringReturns a string that represents the current object.
(Inherited from Object.) Top Extension Methods Name Description HasMethodChecks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) IsEqualCompares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.) To(Type) Overloaded.Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) ToT Overloaded.Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) Top Examplesdouble[] values = { 0, -5, 3, 1, 8 }; Array.Sort(values, new GeneralComparer(ComparerDirection.Ascending, Math.Abs));See Also Reference
Accord.Math.ComparersGeneralComparer
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4