Table of Contents

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

BinarySearchComparer

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

a Coordinates
b Coordinates

Returns

int

A signed integer that indicates the relative values of x and y, as shown in the following table.Value Meaning Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.

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 RootedCoordinateVector

The first object to compare.

y RootedCoordinateVector

The second object to compare.

Returns

int

A signed integer that indicates the relative values of x and y, as shown in the following table.Value Meaning Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.

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 RootedPixelVector

The first object to compare.

y RootedPixelVector

The second object to compare.

Returns

int

A signed integer that indicates the relative values of x and y, as shown in the following table.Value Meaning Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.

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

a double
b double

Returns

int

A signed integer that indicates the relative values of x and y, as shown in the following table.Value Meaning Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.

GetComparer<T>()

public static IComparer<T> GetComparer<T>()

Returns

IComparer<T>

Type Parameters

T