Gets an IComparer object that can be used to compare the levels of this CategoricalScale.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Function GetComparer As IComparer |
| C# |
|---|
public IComparer GetComparer () |
| C++ |
|---|
public: IComparer^ GetComparer () |
Return Value
An object that implements the IComparer interface.
Remarks
The IComparer returned by this method uses the order of the levels as they were
supplied to the CategoricalScale class constructor.
For obvious reasons, a comparer is not available if the scale is not ordered. Attempting to obtain one results in an InvalidOperationException.
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | The scale is not ordered. |