Class BinarySearchComparer
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
IComparer<T> for various types provided by ScottPlot
public sealed class BinarySearchComparer : IComparer<Coordinates>, IComparer<double>, IComparer<RootedCoordinateVector>, IComparer<RootedPixelVector>
- Inheritance
-
BinarySearchComparer
- Implements
- Inherited Members
- Extension Methods
Fields
Instance
Thread-Safe singleton
public static readonly BinarySearchComparer Instance
Field Value
Methods
Compare(Coordinates, Coordinates)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(Coordinates a, Coordinates b)
Parameters
Returns
- int
A signed integer that indicates the relative values of
xandy, as shown in the following table.Value Meaning Less than zeroxis less thany.Zeroxequalsy.Greater than zeroxis greater thany.
Compare(RootedCoordinateVector, RootedCoordinateVector)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(RootedCoordinateVector x, RootedCoordinateVector y)
Parameters
xRootedCoordinateVectorThe first object to compare.
yRootedCoordinateVectorThe second object to compare.
Returns
- int
A signed integer that indicates the relative values of
xandy, as shown in the following table.Value Meaning Less than zeroxis less thany.Zeroxequalsy.Greater than zeroxis greater thany.
Compare(RootedPixelVector, RootedPixelVector)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(RootedPixelVector x, RootedPixelVector y)
Parameters
xRootedPixelVectorThe first object to compare.
yRootedPixelVectorThe second object to compare.
Returns
- int
A signed integer that indicates the relative values of
xandy, as shown in the following table.Value Meaning Less than zeroxis less thany.Zeroxequalsy.Greater than zeroxis greater thany.
Compare(double, double)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(double a, double b)
Parameters
Returns
- int
A signed integer that indicates the relative values of
xandy, as shown in the following table.Value Meaning Less than zeroxis less thany.Zeroxequalsy.Greater than zeroxis greater thany.
GetComparer<T>()
public static IComparer<T> GetComparer<T>()
Returns
- IComparer<T>
Type Parameters
T