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
x
andy
, as shown in the following table.Value Meaning Less than zerox
is less thany
.Zerox
equalsy
.Greater than zerox
is 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
x
RootedCoordinateVectorThe first object to compare.
y
RootedCoordinateVectorThe second object to compare.
Returns
- int
A signed integer that indicates the relative values of
x
andy
, as shown in the following table.Value Meaning Less than zerox
is less thany
.Zerox
equalsy
.Greater than zerox
is 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
x
RootedPixelVectorThe first object to compare.
y
RootedPixelVectorThe second object to compare.
Returns
- int
A signed integer that indicates the relative values of
x
andy
, as shown in the following table.Value Meaning Less than zerox
is less thany
.Zerox
equalsy
.Greater than zerox
is 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
x
andy
, as shown in the following table.Value Meaning Less than zerox
is less thany
.Zerox
equalsy
.Greater than zerox
is greater thany
.
GetComparer<T>()
public static IComparer<T> GetComparer<T>()
Returns
- IComparer<T>
Type Parameters
T